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

@ -136,16 +136,6 @@ func TestHeaderGetVersion_Negative(t *testing.T) {
require.Errorf(t, err, "value is not a header or block")
}
func TestHeaderGetConsensusData(t *testing.T) {
v, block, context, chain := createVMAndPushBlock(t)
defer chain.Close()
err := headerGetConsensusData(context, v)
require.NoError(t, err)
value := v.Estack().Pop().Value().(*big.Int)
require.Equal(t, block.ConsensusData, value.Uint64())
}
func TestHeaderGetMerkleRoot(t *testing.T) {
v, block, context, chain := createVMAndPushBlock(t)
defer chain.Close()