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:
parent
0de5cb1bde
commit
55fd9f8d24
18 changed files with 196 additions and 109 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue