core/block: add Nonce field to header

Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgeniy Stratonikov 2021-07-14 11:32:54 +03:00
parent 2b7abd20e7
commit 3a4e0caeb8
12 changed files with 53 additions and 30 deletions

Binary file not shown.

View file

@ -105,7 +105,7 @@ func TestHashBlockEqualsHashHeader(t *testing.T) {
func TestBinBlockDecodeEncode(t *testing.T) {
// block with two transfer transactions taken from C# privnet
rawblock := "AAAAAAwIVa2D6Yha3tArd5XnwkAf7deJBsdyyvpYb2xMZGBbkOUNHAsfre0rKA/F+Ox05/bQSXmcRZnzK3M6Z+/TxJUh0MNFeAEAAAEAAAAA3u55wYnzAJiwumouuQs6klimx/8BxgxA4MAnF5HGhcOTBjqdXKZIAKcw019v0cSpZj3l04FmLXxAPIPbL1Em2QOE3qBslr1/C4jdLSSq82o3TBr01RqlZgxA6ejwZmZkcfQsbMLS4beqFmtlKuK5eXYj7C7al2XmXqTJcVEm2gnZRUwe4lkBvcil1keYXNLEnHr77lcMLFGHZQxA8JYcGaz9OxOXxECrbVTGAIi+3nXf3ltsqDBmXukPeYO8l0OvXnVR30G+tXwcNw4wqTA2eZbMadwYM14JScDEipMTDCECEDp/fdAWVYWX95YNJ8UWpDlP2Wi55lFV60sBPkBAQG4MIQKnvFX+hoTgEZdo0QS6MHlb3MhmGehkrdJhVnI+0YXNYgwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CDCED2QwH32PmkM53kS4Qq1GsyUS2aGAje2CMT4+DCece5pkUQXvObKUCAFjQuwvA2KcAAAAAACCqRAAAAAAA6AMAAAHe7nnBifMAmLC6ai65CzqSWKbH/wEAWwsCAOH1BQwUgM7HtvW1b1BXj3N/Fi06sU1GZQ0MFN7uecGJ8wCYsLpqLrkLOpJYpsf/FMAfDAh0cmFuc2ZlcgwU9WPqQLwoPU0OBcSOowWz8qBzQO9BYn1bUjkBxgxAuFCM0+tRmD8dC3ZLKxegtoqGGoun28KY79wRgK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xMMIQIQOn990BZVhZf3lg0nxRakOU/ZaLnmUVXrSwE+QEBAbgwhAqe8Vf6GhOARl2jRBLoweVvcyGYZ6GSt0mFWcj7Rhc1iDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcIMIQPZDAffY+aQzneRLhCrUazJRLZoYCN7YIxPj4MJ5x7mmRRBe85spQDYJLwZwNinAAAAAAAgqkQAAAAAAOgDAAAB3u55wYnzAJiwumouuQs6klimx/8BAF8LAwBA2d2ITQoADBSAzse29bVvUFePc38WLTqxTUZlDQwU3u55wYnzAJiwumouuQs6klimx/8UwB8MCHRyYW5zZmVyDBTPduKL0AYsSkeO41VhARMZ88+k0kFifVtSOQHGDEDWn0D7z2ELqpN8ghcM/PtfFwo56/BfEasfHuSKECJMYxvU47r2ZtSihg59lGxSZzHsvxTy6nsyvJ22ycNhINdJDECl61cg937N/HujKsLMu2wJMS7C54bzJ3q22Czqllvw3Yp809USgKDs+W+3QD7rI+SFs0OhIn0gooCUU6f/13WjDEDr9XdeT5CGTO8CL0JigzcTcucs0GBcqHs8fToO6zPuuCfS7Wh6dyxSCijT4A4S+7BUdW3dsO7828ke1fj8oNxmkxMMIQIQOn990BZVhZf3lg0nxRakOU/ZaLnmUVXrSwE+QEBAbgwhAqe8Vf6GhOARl2jRBLoweVvcyGYZ6GSt0mFWcj7Rhc1iDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcIMIQPZDAffY+aQzneRLhCrUazJRLZoYCN7YIxPj4MJ5x7mmRRBe85spQ=="
rawblockBytes, _ := base64.StdEncoding.DecodeString(rawblock)
b := New(false)
@ -152,7 +152,7 @@ func TestBlockSizeCalculation(t *testing.T) {
// should be the same.In this test we provide more details then necessary because in case of failure we can easily debug the
// root cause of the size calculation missmatch.
rawBlock := "AAAAAAwIVa2D6Yha3tArd5XnwkAf7deJBsdyyvpYb2xMZGBbkOUNHAsfre0rKA/F+Ox05/bQSXmcRZnzK3M6Z+/TxJUh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VyDBTPduKL0AYsSkeO41VhARMZ88+k0kFifVtSOQHGDEDWn0D7z2ELqpN8ghcM/PtfFwo56/BfEasfHuSKECJMYxvU47r2ZtSihg59lGxSZzHsvxTy6nsyvJ22ycNhINdJDECl61cg937N/HujKsLMu2wJMS7C54bzJ3q22Czqllvw3Yp809USgKDs+W+3QD7rI+SFs0OhIn0gooCUU6f/13WjDEDr9XdeT5CGTO8CL0JigzcTcucs0GBcqHs8fToO6zPuuCfS7Wh6dyxSCijT4A4S+7BUdW3dsO7828ke1fj8oNxmkxMMIQIQOn990BZVhZf3lg0nxRakOU/ZaLnmUVXrSwE+QEBAbgwhAqe8Vf6GhOARl2jRBLoweVvcyGYZ6GSt0mFWcj7Rhc1iDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcIMIQPZDAffY+aQzneRLhCrUazJRLZoYCN7YIxPj4MJ5x7mmRRBe85spQ=="
rawBlockBytes, _ := base64.StdEncoding.DecodeString(rawBlock)
b := New(false)
@ -195,12 +195,12 @@ func TestBlockSizeCalculation(t *testing.T) {
assert.Equal(t, "DEDgwCcXkcaFw5MGOp1cpkgApzDTX2/RxKlmPeXTgWYtfEA8g9svUSbZA4TeoGyWvX8LiN0tJKrzajdMGvTVGqVmDEDp6PBmZmRx9CxswtLht6oWa2Uq4rl5diPsLtqXZeZepMlxUSbaCdlFTB7iWQG9yKXWR5hc0sScevvuVwwsUYdlDEDwlhwZrP07E5fEQKttVMYAiL7edd/eW2yoMGZe6Q95g7yXQ69edVHfQb61fBw3DjCpMDZ5lsxp3BgzXglJwMSK", base64.StdEncoding.EncodeToString(b.Script.InvocationScript))
assert.Equal(t, "EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEF7zmyl", base64.StdEncoding.EncodeToString(b.Script.VerificationScript))
assert.Equal(t, "02d7c7801742cd404eb178780c840477f1eef4a771ecc8cc9434640fe8f2bb09", b.Hash().StringLE())
assert.Equal(t, "0285238e7b5d3ca50ae8f8636dedb4fa486bc0536016e1f1edfd74442af7412e", b.Hash().StringLE())
benc, err := testserdes.EncodeBinary(b)
assert.NoError(t, err)
// test size of the block
assert.Equal(t, 1430, len(benc))
assert.Equal(t, 1438, len(benc))
assert.Equal(t, rawBlock, base64.StdEncoding.EncodeToString(benc))
}

View file

@ -3,6 +3,8 @@ package block
import (
"encoding/json"
"errors"
"fmt"
"strconv"
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
"github.com/nspcc-dev/neo-go/pkg/crypto/hash"
@ -28,6 +30,9 @@ type Header struct {
// The height of the block must be exactly equal to the height of the previous block plus 1.
Timestamp uint64
// Nonce is block random number.
Nonce uint64
// index/height of the block
Index uint32
@ -57,6 +62,7 @@ type baseAux struct {
PrevHash util.Uint256 `json:"previousblockhash"`
MerkleRoot util.Uint256 `json:"merkleroot"`
Timestamp uint64 `json:"time"`
Nonce string `json:"nonce"`
Index uint32 `json:"index"`
NextConsensus string `json:"nextconsensus"`
PrimaryIndex byte `json:"primary"`
@ -112,6 +118,7 @@ func (b *Header) encodeHashableFields(bw *io.BinWriter) {
bw.WriteBytes(b.PrevHash[:])
bw.WriteBytes(b.MerkleRoot[:])
bw.WriteU64LE(b.Timestamp)
bw.WriteU64LE(b.Nonce)
bw.WriteU32LE(b.Index)
bw.WriteB(b.PrimaryIndex)
bw.WriteBytes(b.NextConsensus[:])
@ -127,6 +134,7 @@ func (b *Header) decodeHashableFields(br *io.BinReader) {
br.ReadBytes(b.PrevHash[:])
br.ReadBytes(b.MerkleRoot[:])
b.Timestamp = br.ReadU64LE()
b.Nonce = br.ReadU64LE()
b.Index = br.ReadU32LE()
b.PrimaryIndex = br.ReadB()
br.ReadBytes(b.NextConsensus[:])
@ -149,6 +157,7 @@ func (b Header) MarshalJSON() ([]byte, error) {
PrevHash: b.PrevHash,
MerkleRoot: b.MerkleRoot,
Timestamp: b.Timestamp,
Nonce: fmt.Sprintf("%016x", b.Nonce),
Index: b.Index,
PrimaryIndex: b.PrimaryIndex,
NextConsensus: address.Uint160ToString(b.NextConsensus),
@ -170,6 +179,13 @@ func (b *Header) UnmarshalJSON(data []byte) error {
return err
}
var nonce uint64
if len(aux.Nonce) != 0 {
nonce, err = strconv.ParseUint(aux.Nonce, 16, 64)
if err != nil {
return err
}
}
nextC, err = address.StringToUint160(aux.NextConsensus)
if err != nil {
return err
@ -181,6 +197,7 @@ func (b *Header) UnmarshalJSON(data []byte) error {
b.PrevHash = aux.PrevHash
b.MerkleRoot = aux.MerkleRoot
b.Timestamp = aux.Timestamp
b.Nonce = nonce
b.Index = aux.Index
b.PrimaryIndex = aux.PrimaryIndex
b.NextConsensus = nextC

View file

@ -200,6 +200,7 @@ func BlockToStackItem(b *block.Block) stackitem.Item {
stackitem.NewByteArray(b.PrevHash.BytesBE()),
stackitem.NewByteArray(b.MerkleRoot.BytesBE()),
stackitem.NewBigInteger(big.NewInt(int64(b.Timestamp))),
stackitem.NewBigInteger(new(big.Int).SetUint64(b.Nonce)),
stackitem.NewBigInteger(big.NewInt(int64(b.Index))),
stackitem.NewByteArray(b.NextConsensus.BytesBE()),
stackitem.NewBigInteger(big.NewInt(int64(len(b.Transactions)))),

View file

@ -148,15 +148,16 @@ func TestLedgerGetBlock(t *testing.T) {
actual, ok := value.([]stackitem.Item)
require.True(t, ok)
require.Equal(t, 8, len(actual))
require.Equal(t, 9, len(actual))
require.Equal(t, b.Hash().BytesBE(), actual[0].Value().([]byte))
require.Equal(t, int64(b.Version), actual[1].Value().(*big.Int).Int64())
require.Equal(t, b.PrevHash.BytesBE(), actual[2].Value().([]byte))
require.Equal(t, b.MerkleRoot.BytesBE(), actual[3].Value().([]byte))
require.Equal(t, int64(b.Timestamp), actual[4].Value().(*big.Int).Int64())
require.Equal(t, int64(b.Index), actual[5].Value().(*big.Int).Int64())
require.Equal(t, b.NextConsensus.BytesBE(), actual[6].Value().([]byte))
require.Equal(t, int64(len(b.Transactions)), actual[7].Value().(*big.Int).Int64())
require.Equal(t, int64(b.Nonce), actual[5].Value().(*big.Int).Int64())
require.Equal(t, int64(b.Index), actual[6].Value().(*big.Int).Int64())
require.Equal(t, b.NextConsensus.BytesBE(), actual[7].Value().([]byte))
require.Equal(t, int64(len(b.Transactions)), actual[8].Value().(*big.Int).Int64())
})
t.Run("bad hash", func(t *testing.T) {
res, err := invokeContractMethod(chain, 100000000, ledger, "getBlock", bhash.BytesLE())

View file

@ -1,13 +1,14 @@
{
"raw": "0000000052191c07e42694c3b5cf52cac55f9812ea0dbc1778ced9eca81a4695ac682bfda919f78252fb966091b920c013e6b90da9d3855c1f423b5fff57b0b89ae84c0a2a498268770100000001000004e0a3c55cad72028fb5901748b19a27be21f6540401fd4a010c4019c88570296ce982f9bc6d2cd6b951756b04b440182e39147af3662855f909d392861bba73f4eb0b059f7f1750473bb4c221c11c73c4abf4072a6e89eb491a020c40e18599ea4d48bcb5761bad306b563f22f58c65f0dada00c203e0326bc96743eaee363b3007af4a1fdbba9ce67a23ba384b7df05f963b814b2429c9e41c50ea720c4019afbb0bcfa9f84e0340a64c004c65e23ff0d9f00ba6980183b739eb5ba63c5d61e7801ec5d23dcd2af510ee5c91b75d6b4feccd8f3e51e6f21b06bb3c0b692d0c40e0356d3118ffce07c0911d75ff97ffb4b4f3b776b93209d7691bd3ca0a0c9de2812142ef1cc1b4afe10d15d58d1d65c241a31501e50bacfd4f97962ee36fa3890c40036976717446f9ea3958845e2833c23c2a7b611331b0d50ee97de23dedf7a14e6efc64e257588c44493859cc8dc3da7755cf445c76be4c780fdeb291ba2766a8fdfd00150c2103009b7540e10f2562e5fd8fac9eaec25166a58b26e412348ff5a86927bfac22a20c21030205e9cefaea5a1dfc580af20c8d5aa2468bb0148f1a5e4605fc622c80e604ba0c210214baf0ceea3a66f17e7e1e839ea25fd8bed6cd82e6bb6e68250189065f44ff010c21023e9b32ea89b94d066e649b124fd50e396ee91369e8e2a6ae1b11c170d022256d0c2103408dcd416396f64783ac587ea1e1593c57d9fea880c8a6a1920e92a2594778060c2102a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b0c2102ba2c70f5996f357a43198705859fae2cfea13e1172962800772b3d588a9d4abd170b41138defaf01004883fd4bb494980000000000983c8500000000007f17000002574d3c03df4a9b2772af08e4b296721009b7a6fd00e0a3c55cad72028fb5901748b19a27be21f6540401005f0b0300e40b54020000000c14f6ed986d8f6478b647ddae2083069ca4cfdb23400c14e0a3c55cad72028fb5901748b19a27be21f6540414c01f0c087472616e736665720c1428b3adab7269f9c2181db3cb741ebf551930e27041627d5b523902420c4001a8eb709edc764591af846e7bfba10a908577ad57365b590593a4f81ea5a86ac046b9e1ac69ed39ec30cb97c2c7ef538f00fc105027758454b2bede94cd3bef290c2102a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b0b4195440d78fd4a010c40e254613ac2b3bd756d907932b15278e62b094a3eab90eff5aa2c56b598161852775cbd76076ac01fe48afdf897077845c415b3ca7884668e94396719b6db66e30c40a7427e3cd5238e3a5d4ab3b4361a37872af3dd8be336b9f1f19f0bd4972edb879b781d0c45dc684da7b220b8d399bea1948c1fe924daa5edbb8df117894130530c4099a1516792326083e50d99d4a97425b31c429136949688081619084403e0065c6ba576a0a4589d9115e3cf71c843c52e476b62ff4349c73838b2c2cb39f6c43d0c409ec13c315e485503ce8d1c821b0ed41ce3f39e914352973ec8ee1fefd024e106e709610bf9d500f56ec0e72c09e427cd8fd0a68bd9ef3b21176e8afd80aaef710c4022d33dc3217be4bb22144d98552ef35f23b1f10367924b4c6bea71d6c280cf2a2fff15f3c9f235cd5620bf310709aa53d6403e6d2fe6d07f13d83803a2c13a7ffdfd00150c2103009b7540e10f2562e5fd8fac9eaec25166a58b26e412348ff5a86927bfac22a20c21030205e9cefaea5a1dfc580af20c8d5aa2468bb0148f1a5e4605fc622c80e604ba0c210214baf0ceea3a66f17e7e1e839ea25fd8bed6cd82e6bb6e68250189065f44ff010c21023e9b32ea89b94d066e649b124fd50e396ee91369e8e2a6ae1b11c170d022256d0c2103408dcd416396f64783ac587ea1e1593c57d9fea880c8a6a1920e92a2594778060c2102a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b0c2102ba2c70f5996f357a43198705859fae2cfea13e1172962800772b3d588a9d4abd170b41138defaf",
"raw": "0000000052191c07e42694c3b5cf52cac55f9812ea0dbc1778ced9eca81a4695ac682bfda919f78252fb966091b920c013e6b90da9d3855c1f423b5fff57b0b89ae84c0a2a4982687701000563412907856341200001000004e0a3c55cad72028fb5901748b19a27be21f6540401fd4a010c4019c88570296ce982f9bc6d2cd6b951756b04b440182e39147af3662855f909d392861bba73f4eb0b059f7f1750473bb4c221c11c73c4abf4072a6e89eb491a020c40e18599ea4d48bcb5761bad306b563f22f58c65f0dada00c203e0326bc96743eaee363b3007af4a1fdbba9ce67a23ba384b7df05f963b814b2429c9e41c50ea720c4019afbb0bcfa9f84e0340a64c004c65e23ff0d9f00ba6980183b739eb5ba63c5d61e7801ec5d23dcd2af510ee5c91b75d6b4feccd8f3e51e6f21b06bb3c0b692d0c40e0356d3118ffce07c0911d75ff97ffb4b4f3b776b93209d7691bd3ca0a0c9de2812142ef1cc1b4afe10d15d58d1d65c241a31501e50bacfd4f97962ee36fa3890c40036976717446f9ea3958845e2833c23c2a7b611331b0d50ee97de23dedf7a14e6efc64e257588c44493859cc8dc3da7755cf445c76be4c780fdeb291ba2766a8fdfd00150c2103009b7540e10f2562e5fd8fac9eaec25166a58b26e412348ff5a86927bfac22a20c21030205e9cefaea5a1dfc580af20c8d5aa2468bb0148f1a5e4605fc622c80e604ba0c210214baf0ceea3a66f17e7e1e839ea25fd8bed6cd82e6bb6e68250189065f44ff010c21023e9b32ea89b94d066e649b124fd50e396ee91369e8e2a6ae1b11c170d022256d0c2103408dcd416396f64783ac587ea1e1593c57d9fea880c8a6a1920e92a2594778060c2102a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b0c2102ba2c70f5996f357a43198705859fae2cfea13e1172962800772b3d588a9d4abd170b41138defaf01004883fd4bb494980000000000983c8500000000007f17000002574d3c03df4a9b2772af08e4b296721009b7a6fd00e0a3c55cad72028fb5901748b19a27be21f6540401005f0b0300e40b54020000000c14f6ed986d8f6478b647ddae2083069ca4cfdb23400c14e0a3c55cad72028fb5901748b19a27be21f6540414c01f0c087472616e736665720c1428b3adab7269f9c2181db3cb741ebf551930e27041627d5b523902420c4001a8eb709edc764591af846e7bfba10a908577ad57365b590593a4f81ea5a86ac046b9e1ac69ed39ec30cb97c2c7ef538f00fc105027758454b2bede94cd3bef290c2102a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b0b4195440d78fd4a010c40e254613ac2b3bd756d907932b15278e62b094a3eab90eff5aa2c56b598161852775cbd76076ac01fe48afdf897077845c415b3ca7884668e94396719b6db66e30c40a7427e3cd5238e3a5d4ab3b4361a37872af3dd8be336b9f1f19f0bd4972edb879b781d0c45dc684da7b220b8d399bea1948c1fe924daa5edbb8df117894130530c4099a1516792326083e50d99d4a97425b31c429136949688081619084403e0065c6ba576a0a4589d9115e3cf71c843c52e476b62ff4349c73838b2c2cb39f6c43d0c409ec13c315e485503ce8d1c821b0ed41ce3f39e914352973ec8ee1fefd024e106e709610bf9d500f56ec0e72c09e427cd8fd0a68bd9ef3b21176e8afd80aaef710c4022d33dc3217be4bb22144d98552ef35f23b1f10367924b4c6bea71d6c280cf2a2fff15f3c9f235cd5620bf310709aa53d6403e6d2fe6d07f13d83803a2c13a7ffdfd00150c2103009b7540e10f2562e5fd8fac9eaec25166a58b26e412348ff5a86927bfac22a20c21030205e9cefaea5a1dfc580af20c8d5aa2468bb0148f1a5e4605fc622c80e604ba0c210214baf0ceea3a66f17e7e1e839ea25fd8bed6cd82e6bb6e68250189065f44ff010c21023e9b32ea89b94d066e649b124fd50e396ee91369e8e2a6ae1b11c170d022256d0c2103408dcd416396f64783ac587ea1e1593c57d9fea880c8a6a1920e92a2594778060c2102a7834be9b32e2981d157cb5bbd3acb42cfd11ea5c3b10224d7a44e98c5910f1b0c2102ba2c70f5996f357a43198705859fae2cfea13e1172962800772b3d588a9d4abd170b41138defaf",
"size" : 1564,
"index" : 256,
"primary" : 4,
"nonce": "0x1234567890123456",
"time" : 1612366104874,
"confirmations" : 10883,
"previousblockhash" : "0xfd2b68ac95461aa8ecd9ce7817bc0dea12985fc5ca52cfb5c39426e4071c1952",
"nextconsensus" : "NgPkjjLTNcQad99iRYeXRUuowE4gxLAnDL",
"hash" : "0x53b3d970ccb235bef785633817f2a947f63bac1f7fa23103f7d080a53f0361f4",
"hash" : "0x79cdba60b0197e3e3e7e8b8e42a56fd3a7c1530561da04a030c8201880b11795",
"witnesses" : [
{
"verification" : "FQwhAwCbdUDhDyVi5f2PrJ6uwlFmpYsm5BI0j/WoaSe/rCKiDCEDAgXpzvrqWh38WAryDI1aokaLsBSPGl5GBfxiLIDmBLoMIQIUuvDO6jpm8X5+HoOeol/YvtbNgua7bmglAYkGX0T/AQwhAj6bMuqJuU0GbmSbEk/VDjlu6RNp6OKmrhsRwXDQIiVtDCEDQI3NQWOW9keDrFh+oeFZPFfZ/qiAyKahkg6SollHeAYMIQKng0vpsy4pgdFXy1u9OstCz9EepcOxAiTXpE6YxZEPGwwhAroscPWZbzV6QxmHBYWfriz+oT4RcpYoAHcrPViKnUq9FwtBE43vrw==",

View file

@ -30,6 +30,7 @@ func createGenesisBlock(cfg config.ProtocolConfiguration) (*block.Block, error)
Version: 0,
PrevHash: util.Uint256{},
Timestamp: uint64(time.Date(2016, 7, 15, 15, 8, 21, 0, time.UTC).Unix()) * 1000, // Milliseconds.
Nonce: 2083236893,
Index: 0,
NextConsensus: nextConsensus,
Script: transaction.Witness{

View file

@ -17,7 +17,7 @@ func TestGenesisBlockMainNet(t *testing.T) {
block, err := createGenesisBlock(cfg.ProtocolConfiguration)
require.NoError(t, err)
expect := "c3db4ba50ede4f9e749bd97e1499953ae17e65a415c6bf9e38c01cf92b03d156"
expect := "1f4d1defa46faa5e7b9b8d3f79a06bec777d7c26c4aa5f6f5899a291daa87c15"
assert.Equal(t, expect, block.Hash().StringLE())
}

View file

@ -19,6 +19,8 @@ type Block struct {
MerkleRoot interop.Hash256
// Timestamp represents millisecond-precision block timestamp.
Timestamp int
// Nonce represents block nonce.
Nonce int
// Index represents the height of the block.
Index int
// NextConsensus represents contract address of the next miner (160 bit BE

View file

@ -48,17 +48,17 @@ type rpcClientTestCase struct {
check func(t *testing.T, c *Client, result interface{})
}
const base64B1 = "AAAAAAwIVa2D6Yha3tArd5XnwkAf7deJBsdyyvpYb2xMZGBb/YwjvRiYdH/LL9atXcWbYsXLHqkKEutiil4zsK7lKrFxU6tEeAEAAAEAAAAA3u55wYnzAJiwumouuQs6klimx/8BxgxAUfn6Pu/yxlYcuGzwM7RzacB9z9YG7J77DR/j9NfrNR7leWUd0qTqnqiD1H9Vydj401smVWnTg/XAisjZTFpT+gxAAT3EbjC87Gb5UEe+Pvx3AP31lJeIuQL1gKcm6SfJBMaHon2g1dAah3xrKXrj3nGRypvWTKCVEXXDFzEL3ZndswxA/eGxm/DUde1jWbvi+avLdId0VH2roTyqJScLblo5xtRRHm0uKf6NObl6cNJLnSjcumrOQbMVgruDb7WIaOl0E5MTDCECEDp/fdAWVYWX95YNJ8UWpDlP2Wi55lFV60sBPkBAQG4MIQKnvFX+hoTgEZdo0QS6MHlb3MhmGehkrdJhVnI+0YXNYgwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CDCED2QwH32PmkM53kS4Qq1GsyUS2aGAje2CMT4+DCece5pkUQXvObKUCAAIAAADA2KcAAAAAAAx5QwAAAAAAsAQAAAHe7nnBifMAmLC6ai65CzqSWKbH/wEAWwsC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SCiJgu+pMTDCECEDp/fdAWVYWX95YNJ8UWpDlP2Wi55lFV60sBPkBAQG4MIQKnvFX+hoTgEZdo0QS6MHlb3MhmGehkrdJhVnI+0YXNYgwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CDCED2QwH32PmkM53kS4Qq1GsyUS2aGAje2CMT4+DCece5pkUQZ7Q3Do="
const b1Verbose = `{"size":1430,"nextblockhash":"0xe03cb7e00a1e04b75f9acd56f22af5f15877a18f4a1cf69991319c4fba0b2fee","confirmations":10,"hash":"0x81a439175d3bdd8961b6223a9b6f6d234f996824c5cfce6af17e6fc14cd84355","version":0,"previousblockhash":"0x5b60644c6c6f58faca72c70689d7ed1f40c2e795772bd0de5a88e983ad55080c","merkleroot":"0xb12ae5aeb0335e8a62eb120aa91ecbc5629bc55dadd62fcb7f749818bd238cfd","time":1616059782001,"index":1,"nextconsensus":"NgEisvCqr2h8wpRxQb7bVPWUZdbVCY8Uo6","primary":0,"witnesses":[{"invocation":"DEBR+fo+7/LGVhy4bPAztHNpwH3P1gbsnvsNH+P01+s1HuV5ZR3SpOqeqIPUf1XJ2PjTWyZVadOD9cCKyNlMWlP6DEABPcRuMLzsZvlQR74+/HcA/fWUl4i5AvWApybpJ8kExoeifaDV0BqHfGspeuPecZHKm9ZMoJURdcMXMQvdmd2zDED94bGb8NR17WNZu+L5q8t0h3RUfauhPKolJwtuWjnG1FEebS4p/o05uXpw0kudKNy6as5BsxWCu4NvtYho6XQT","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEF7zmyl"}],"tx":[{"hash":"0xf5fbd303799f24ba247529d7544d4276cca54ea79f4b98095f2b0557313c5275","size":488,"version":0,"nonce":2,"sender":"NgEisvCqr2h8wpRxQb7bVPWUZdbVCY8Uo6","sysfee":"11000000","netfee":"4421900","validuntilblock":1200,"attributes":[],"signers":[{"account":"0xffc7a658923a0bb92e6abab09800f389c179eede","scopes":"CalledByEntry"}],"script":"CwIY3fUFDBRVVC1T7Q9VRvrUTW6ZkShnAi/OXgwU3u55wYnzAJiwumouuQs6klimx/8UwB8MCHRyYW5zZmVyDBT1Y+pAvCg9TQ4FxI6jBbPyoHNA70FifVtSOQ==","witnesses":[{"invocation":"DEBMibb/TMzF2Iztec98rvVxXh93R6UBnBztgf7RK3chaY8phIxh+J1f3GAtz3zAuLwiSn1wSans9RPKqgepiauoDEBvHFZj5u3aZ7UkfylMc0wh9ydIuvtlVb3Y/6OOn8HN3RCs7VLLgnaT33Rn1gWByLQBzAldjrJnDfxDSGqfSmjfDECEMpyZHe5lfkSBzlPoP9jC22fDS+7TUt7Bkx6ZZf5aDu09IFrWzPitxkvz4SrAygCdJdzMkBXYZPUatkO828FM","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEF7zmyl"}]},{"hash":"0xfe60f7f4c720a7b0fde52f285ca173a3493bbb15eae9f5c44c1f71b493d5693c","size":492,"version":0,"nonce":3,"sender":"NgEisvCqr2h8wpRxQb7bVPWUZdbVCY8Uo6","sysfee":"11000000","netfee":"4425900","validuntilblock":1200,"attributes":[],"signers":[{"account":"0xffc7a658923a0bb92e6abab09800f389c179eede","scopes":"CalledByEntry"}],"script":"CwMA6HZIFwAAAAwUVVQtU+0PVUb61E1umZEoZwIvzl4MFN7uecGJ8wCYsLpqLrkLOpJYpsf/FMAfDAh0cmFuc2ZlcgwUz3bii9AGLEpHjuNVYQETGfPPpNJBYn1bUjk=","witnesses":[{"invocation":"DEDUTymqNCsQOxQvsHZT67aH3kmvrK85sIdtaJ/q1HHpyk2rLtUUn/kDlPpbk0sshkEP2izllCr6tEiA6WJA5ZGLDEDKzE8svrBWwRMlmba9xVDdkEfsgdrzbCNCjIoauFAf6vKAUX9OZUfoTmgQ7P9uxDC52TrQJYkpysXJfN9eUrkoDECMfTD0i3ZOVrHXG/dPnGy1pKX2V7Z/JgNr6yYPBH7K2eYZGRI2fehawd1LwHsDVPM/vpbcOLGfY0UWn3+PcPdy","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEF7zmyl"}]}]}`
const b1Verbose = `{"size":1438,"nextblockhash":"0x34c20650683940a7af1881c2798e83acf9bf98aa226025af6c1d32b5530cc900","confirmations":15,"hash":"0x88c1cbf68695f73fb7b7d185c0037ffebdf032327488ebe65e0533d269e7de9b","version":0,"previousblockhash":"0x0f8fb4e17d2ab9f3097af75ca7fd16064160fb8043db94909e00dd4e257b9dc4","merkleroot":"0x2855f471048a5f0c9c60c10592f8997007aa3e52815d1b8c2c2f57e5e340d5f6","time":1626251469001,"nonce":"0","index":1,"nextconsensus":"NVTiAjNgagDkTr5HTzDmQP9kPwPHN5BgVq","primary":0,"witnesses":[{"invocation":"DEBg0hpK90iZlB4ZSCG7BOr7BsvPXGDax360lvqKeNFuzaGI1RYNH50/dhQLxocy90JdsIOyodd1sOJGEjZIt7ztDEAHc2avJzz6tK+FOQMIZO/FEEikJdLJX0+iZXFcsmDRpB7lo2wWMSQbcoTXNg7leuR0VeDsKJ+YdvCuTG5WbiqWDECa6Yjj+bK4te5KR5jdLF5kLt03csyozZcd/X7NPt89IsX01zpX8ec3e+B2qySJIOhEf3cK0i+5U5wyXiFcRI8x","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEGe0Nw6"}],"tx":[{"hash":"0xf01080c50f3198f5a539c4a06d024f1b8bdc2a360a215fa7e2488f79a56d501a","size":488,"version":0,"nonce":2,"sender":"NVTiAjNgagDkTr5HTzDmQP9kPwPHN5BgVq","sysfee":"11000000","netfee":"4421900","validuntilblock":1200,"attributes":[],"signers":[{"account":"0x3f223f6da778e805d1b9b479906c0e8c1ee8b968","scopes":"CalledByEntry"}],"script":"CwIY3fUFDBTunqIsJ+NL0BSPxBCOCPdOj1BIsgwUaLnoHowObJB5tLnRBeh4p20/Ij8UwB8MCHRyYW5zZmVyDBT1Y+pAvCg9TQ4FxI6jBbPyoHNA70FifVtSOQ==","witnesses":[{"invocation":"DEC8InWg8rQHWjklRojobu7kn4r0xZY2xWYs15ggVX4PQyEHpNTU6vZHT2TXRdPXAOKHhgWAttO0oTvo+9VZAjIVDEBF0qvBMlvmYJIYLqSoCjhBykcSN78UXrBjO5BKL8BpHtejWCld1VT6Z7nYrEBLgySD6HeMcp/fa6vqHzU220e/DECXtm5AA1jy9GFA7t8U6a+1uPrQFk4Ufp0UyXsun0PvN0NdhrHc37xm8k9Z0dB85V/7WLtkMaLLyjVNVIKImC76","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEGe0Nw6"}]},{"hash":"0xced32af656e144f6be5d7172ed37747831456cb3eeaac4ee964d0b479b45d3a8","size":492,"version":0,"nonce":3,"sender":"NVTiAjNgagDkTr5HTzDmQP9kPwPHN5BgVq","sysfee":"11000000","netfee":"4425900","validuntilblock":1200,"attributes":[],"signers":[{"account":"0x3f223f6da778e805d1b9b479906c0e8c1ee8b968","scopes":"CalledByEntry"}],"script":"CwMA6HZIFwAAAAwU7p6iLCfjS9AUj8QQjgj3To9QSLIMFGi56B6MDmyQebS50QXoeKdtPyI/FMAfDAh0cmFuc2ZlcgwUz3bii9AGLEpHjuNVYQETGfPPpNJBYn1bUjk=","witnesses":[{"invocation":"DEDgj/SQT84EbWRZ4ZKhyjJTuLwVPDgVlQO3CGmgacItvni9nziJvTxziZXBG/0Hqkv68ddS1EH94RtWlqLQWRCjDEAWZUeSQ8KskILSvoWPN3836xpg/TYzOGiFVoePv91CFnap4fRFxdbporBgnZ/sUsjFZ74U8f+r0riqtvkdMMyGDEDx5iho79oDVYOCwIDH3K1UeDjAT6Hq9YsD9SCfJSE1rRsAdJPh2StYxdh9Jah1lwGbW0U+Wu6zpbVFf5CS6fFc","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEGe0Nw6"}]}]}`
const base64Header1 = "AAAAAAwIVa2D6Yha3tArd5XnwkAf7deJBsdyyvpYb2xMZGBb/YwjvRiYdH/LL9atXcWbYsXLHqkKEutiil4zsK7lKrFxU6tEeAEAAAEAAAAA3u55wYnzAJiwumouuQs6klimx/8BxgxAUfn6Pu/yxlYcuGzwM7RzacB9z9YG7J77DR/j9NfrNR7leWUd0qTqnqiD1H9Vydj401smVWnTg/XAisjZTFpT+gxAAT3EbjC87Gb5UEe+Pvx3AP31lJeIuQL1gKcm6SfJBMaHon2g1dAah3xrKXrj3nGRypvWTKCVEXXDFzEL3ZndswxA/eGxm/DUde1jWbvi+avLdId0VH2roTyqJScLblo5xtRRHm0uKf6NObl6cNJLnSjcumrOQbMVgruDb7WIaOl0E5MTDCECEDp/fdAWVYWX95YNJ8UWpDlP2Wi55lFV60sBPkBAQG4MIQKnvFX+hoTgEZdo0QS6MHlb3MhmGehkrdJhVnI+0YXNYgwhArNiK/QBe9/jF8WK7V9MdT8ga324lgRvp9d0u8S/f43CDCED2QwH32PmkM53kS4Qq1GsyUS2aGAje2CMT4+DCece5pkUQXvObKU="
const base64Header1 = "AAAAAMSdeyVO3QCekJTbQ4D7YEEGFv2nXPd6CfO5Kn3htI8P9tVA4+VXLyyMG12BUj6qB3CZ+JIFwWCcDF+KBHH0VSjJICSkegEAAAAAAAAAAAAAAQAAAABouegejA5skHm0udEF6HinbT8iPwHGDEBg0hpK90iZlB4ZSCG7BOr7BsvPXGDax360lvqKeNFuzaGI1RYNH50/dhQLxocy90JdsIOyodd1sOJGEjZIt7ztDEAHc2avJzz6tK+FOQMIZO/FEEikJdLJX0+iZXFcsmDRpB7lo2wWMSQbcoTXNg7leuR0VeDsKJ+YdvCuTG5WbiqWDECa6Yjj+bK4te5KR5jdLF5kLt03csyozZcd/X7NPt89IsX01zpX8ec3e+B2qySJIOhEf3cK0i+5U5wyXiFcRI8xkxMMIQIQOn990BZVhZf3lg0nxRakOU/ZaLnmUVXrSwE+QEBAbgwhAqe8Vf6GhOARl2jRBLoweVvcyGYZ6GSt0mFWcj7Rhc1iDCECs2Ir9AF73+MXxYrtX0x1PyBrfbiWBG+n13S7xL9/jcIMIQPZDAffY+aQzneRLhCrUazJRLZoYCN7YIxPj4MJ5x7mmRRBntDcOg=="
const header1Verbose = `{"hash":"0x81a439175d3bdd8961b6223a9b6f6d234f996824c5cfce6af17e6fc14cd84355","size":449,"version":0,"previousblockhash":"0x5b60644c6c6f58faca72c70689d7ed1f40c2e795772bd0de5a88e983ad55080c","merkleroot":"0xb12ae5aeb0335e8a62eb120aa91ecbc5629bc55dadd62fcb7f749818bd238cfd","time":1616059782001,"index":1,"nextconsensus":"NgEisvCqr2h8wpRxQb7bVPWUZdbVCY8Uo6","witnesses":[{"invocation":"DEBR+fo+7/LGVhy4bPAztHNpwH3P1gbsnvsNH+P01+s1HuV5ZR3SpOqeqIPUf1XJ2PjTWyZVadOD9cCKyNlMWlP6DEABPcRuMLzsZvlQR74+/HcA/fWUl4i5AvWApybpJ8kExoeifaDV0BqHfGspeuPecZHKm9ZMoJURdcMXMQvdmd2zDED94bGb8NR17WNZu+L5q8t0h3RUfauhPKolJwtuWjnG1FEebS4p/o05uXpw0kudKNy6as5BsxWCu4NvtYho6XQT","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEF7zmyl"}],"confirmations":10,"nextblockhash":"0xe03cb7e00a1e04b75f9acd56f22af5f15877a18f4a1cf69991319c4fba0b2fee"}`
const header1Verbose = `{"hash":"0x88c1cbf68695f73fb7b7d185c0037ffebdf032327488ebe65e0533d269e7de9b","size":457,"version":0,"previousblockhash":"0x0f8fb4e17d2ab9f3097af75ca7fd16064160fb8043db94909e00dd4e257b9dc4","merkleroot":"0x2855f471048a5f0c9c60c10592f8997007aa3e52815d1b8c2c2f57e5e340d5f6","time":1626251469001,"index":1,"nextconsensus":"NVTiAjNgagDkTr5HTzDmQP9kPwPHN5BgVq","witnesses":[{"invocation":"DEBg0hpK90iZlB4ZSCG7BOr7BsvPXGDax360lvqKeNFuzaGI1RYNH50/dhQLxocy90JdsIOyodd1sOJGEjZIt7ztDEAHc2avJzz6tK+FOQMIZO/FEEikJdLJX0+iZXFcsmDRpB7lo2wWMSQbcoTXNg7leuR0VeDsKJ+YdvCuTG5WbiqWDECa6Yjj+bK4te5KR5jdLF5kLt03csyozZcd/X7NPt89IsX01zpX8ec3e+B2qySJIOhEf3cK0i+5U5wyXiFcRI8x","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEGe0Nw6"}],"confirmations":15,"nextblockhash":"0x34c20650683940a7af1881c2798e83acf9bf98aa226025af6c1d32b5530cc900"}`
const txMoveNeoVerbose = `{"blockhash":"0x81a439175d3bdd8961b6223a9b6f6d234f996824c5cfce6af17e6fc14cd84355","confirmations":10,"blocktime":1616059782001,"vmstate":"HALT","hash":"0xf5fbd303799f24ba247529d7544d4276cca54ea79f4b98095f2b0557313c5275","size":488,"version":0,"nonce":2,"sender":"NgEisvCqr2h8wpRxQb7bVPWUZdbVCY8Uo6","sysfee":"11000000","netfee":"4421900","validuntilblock":1200,"attributes":[],"signers":[{"account":"0xffc7a658923a0bb92e6abab09800f389c179eede","scopes":"CalledByEntry"}],"script":"CwIY3fUFDBRVVC1T7Q9VRvrUTW6ZkShnAi/OXgwU3u55wYnzAJiwumouuQs6klimx/8UwB8MCHRyYW5zZmVyDBT1Y+pAvCg9TQ4FxI6jBbPyoHNA70FifVtSOQ==","witnesses":[{"invocation":"DEBMibb/TMzF2Iztec98rvVxXh93R6UBnBztgf7RK3chaY8phIxh+J1f3GAtz3zAuLwiSn1wSans9RPKqgepiauoDEBvHFZj5u3aZ7UkfylMc0wh9ydIuvtlVb3Y/6OOn8HN3RCs7VLLgnaT33Rn1gWByLQBzAldjrJnDfxDSGqfSmjfDECEMpyZHe5lfkSBzlPoP9jC22fDS+7TUt7Bkx6ZZf5aDu09IFrWzPitxkvz4SrAygCdJdzMkBXYZPUatkO828FM","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEF7zmyl"}]}`
const txMoveNeoVerbose = `{"blockhash":"0x88c1cbf68695f73fb7b7d185c0037ffebdf032327488ebe65e0533d269e7de9b","confirmations":15,"blocktime":1626251469001,"vmstate":"HALT","hash":"0xf01080c50f3198f5a539c4a06d024f1b8bdc2a360a215fa7e2488f79a56d501a","size":488,"version":0,"nonce":2,"sender":"NVTiAjNgagDkTr5HTzDmQP9kPwPHN5BgVq","sysfee":"11000000","netfee":"4421900","validuntilblock":1200,"attributes":[],"signers":[{"account":"0x3f223f6da778e805d1b9b479906c0e8c1ee8b968","scopes":"CalledByEntry"}],"script":"CwIY3fUFDBTunqIsJ+NL0BSPxBCOCPdOj1BIsgwUaLnoHowObJB5tLnRBeh4p20/Ij8UwB8MCHRyYW5zZmVyDBT1Y+pAvCg9TQ4FxI6jBbPyoHNA70FifVtSOQ==","witnesses":[{"invocation":"DEC8InWg8rQHWjklRojobu7kn4r0xZY2xWYs15ggVX4PQyEHpNTU6vZHT2TXRdPXAOKHhgWAttO0oTvo+9VZAjIVDEBF0qvBMlvmYJIYLqSoCjhBykcSN78UXrBjO5BKL8BpHtejWCld1VT6Z7nYrEBLgySD6HeMcp/fa6vqHzU220e/DECXtm5AA1jy9GFA7t8U6a+1uPrQFk4Ufp0UyXsun0PvN0NdhrHc37xm8k9Z0dB85V/7WLtkMaLLyjVNVIKImC76","verification":"EwwhAhA6f33QFlWFl/eWDSfFFqQ5T9loueZRVetLAT5AQEBuDCECp7xV/oaE4BGXaNEEujB5W9zIZhnoZK3SYVZyPtGFzWIMIQKzYiv0AXvf4xfFiu1fTHU/IGt9uJYEb6fXdLvEv3+NwgwhA9kMB99j5pDOd5EuEKtRrMlEtmhgI3tgjE+PgwnnHuaZFEGe0Nw6"}]}`
// getResultBlock1 returns data for block number 1 which is used by several tests.
func getResultBlock1() *result.Block {
@ -71,16 +71,16 @@ func getResultBlock1() *result.Block {
if err != nil {
panic(err)
}
b2Hash, err := util.Uint256DecodeStringLE("e03cb7e00a1e04b75f9acd56f22af5f15877a18f4a1cf69991319c4fba0b2fee")
b2Hash, err := util.Uint256DecodeStringLE("34c20650683940a7af1881c2798e83acf9bf98aa226025af6c1d32b5530cc900")
if err != nil {
panic(err)
}
return &result.Block{
Block: *b,
BlockMetadata: result.BlockMetadata{
Size: 1430,
Size: 1438,
NextBlockHash: &b2Hash,
Confirmations: 10,
Confirmations: 15,
},
}
}
@ -265,7 +265,7 @@ var rpcClientTestCases = map[string][]rpcClientTestCase{
b := getResultBlock1()
return &result.Header{
Hash: b.Hash(),
Size: 449,
Size: 457,
Version: b.Version,
NextBlockHash: b.NextBlockHash,
PrevBlockHash: b.PrevHash,

View file

@ -54,15 +54,15 @@ type rpcTestCase struct {
check func(t *testing.T, e *executor, result interface{})
}
const testContractHash = "63cc6571e990dd3f345f699fc9c2a6e49edb89af"
const deploymentTxHash = "9b0c586eb07f8c9b6fc46b05c78d87651d50af8e1f44478827848d826f8cd174"
const genesisBlockHash = "73fe50b5564d57118296cbab0a78fe7cb11c97b7699d07a9a21fab60e79bb8fc"
const testContractHash = "bb6a679438ce0fc6cb0ed1aa85ce83cf96cd3aeb"
const deploymentTxHash = "1f8792e07f223e5e83f86cda3327cbe78c15ea382a1c350101c9119747682ce2"
const genesisBlockHash = "0f8fb4e17d2ab9f3097af75ca7fd16064160fb8043db94909e00dd4e257b9dc4"
const verifyContractHash = "c50082e0d8364d61ce6933bd24027a3363474dce"
const verifyContractAVM = "VwMAQS1RCDAhcAwU7p6iLCfjS9AUj8QQjgj3To9QSLLbMHFoE87bKGnbKJdA"
const verifyWithArgsContractHash = "8744ffdd07af8e9f18ab90685c8c2ebfd37c6415"
const invokescriptContractAVM = "VwcADBQBDAMOBQYMDQIODw0DDgcJAAAAANswcGhB+CfsjCGqJgQRQAwUDQ8DAgkAAgEDBwMEBQIBAA4GDAnbMHFpQfgn7IwhqiYEEkATQA=="
const nameServiceContractHash = "60d78a0fc048399438c3764f8a67d0fc86d6e0e6"
const verifyContractHash = "f68822e4ecd93de334bdf1f7c409eda3431bcbd0"
const verifyContractAVM = "VwIAQS1RCDAhcAwU7p6iLCfjS9AUj8QQjgj3To9QSLLbMHFoE87bKGnbKJdA"
const verifyWithArgsContractHash = "947c780f45b2a3d32e946355ee5cb57faf4decb7"
const invokescriptContractAVM = "VwIADBQBDAMOBQYMDQIODw0DDgcJAAAAANswcGhB+CfsjCGqJgQRQAwUDQ8DAgkAAgEDBwMEBQIBAA4GDAnbMHFpQfgn7IwhqiYEEkATQA=="
const nameServiceContractHash = "66206eb850818ec862a9332e0da10b9b7826cb0b"
var rpcTestCases = map[string][]rpcTestCase{
"getapplicationlog": {
@ -1643,7 +1643,7 @@ func checkNep17Balances(t *testing.T, e *executor, acc interface{}) {
},
{
Asset: e.chain.UtilityTokenHash(),
Amount: "57941360260",
Amount: "57941227260",
LastUpdated: 15,
}},
Address: testchain.PrivateKeyByID(0).GetScriptHash().StringLE(),

Binary file not shown.