core: change block.ConsensusData to neo3 format

1. Dropped `Base.ConsensusData` block field

2. Added `Block.ConsensusData` field with `Nonce` and `PrimaryIndex`

3. Removed "Neo.Header.GetConsensusData" and
"AntShares.Header.GetConsensusData" interops
This commit is contained in:
Anna Shaleva 2020-04-22 08:57:55 +03:00
parent 0de5cb1bde
commit 55fd9f8d24
18 changed files with 196 additions and 109 deletions

View file

@ -73,13 +73,16 @@ func newDumbBlock() *Block {
MerkleRoot: hash.Sha256([]byte("b")),
Timestamp: 100500,
Index: 1,
ConsensusData: 1111,
NextConsensus: hash.Hash160([]byte("a")),
Script: transaction.Witness{
VerificationScript: []byte{0x51}, // PUSH1
InvocationScript: []byte{0x61}, // NOP
},
},
ConsensusData: ConsensusData{
PrimaryIndex: 0,
Nonce: 1111,
},
Transactions: []*transaction.Transaction{
transaction.NewMinerTX(),
transaction.NewIssueTX(),