native: replace NEP-5 with NEP-17

This commit is contained in:
Evgenii Stratonikov 2020-11-19 18:01:42 +03:00
parent a5914f89fa
commit b97dfae8d8
27 changed files with 195 additions and 134 deletions

View file

@ -299,16 +299,7 @@ func runtimeLog(ic *interop.Context) error {
// runtimeGetTime returns timestamp of the block being verified, or the latest
// one in the blockchain if no block is given to Context.
func runtimeGetTime(ic *interop.Context) error {
var header *block.Header
if ic.Block == nil {
var err error
header, err = ic.Chain.GetHeader(ic.Chain.CurrentBlockHash())
if err != nil {
return err
}
} else {
header = ic.Block.Header()
}
header := ic.Block.Header()
ic.VM.Estack().PushVal(header.Timestamp)
return nil
}