*: drop miner transaction
1. Completely remove miner transaction 2. Change validation rule for block: block without transactions is valid.
This commit is contained in:
parent
55fd9f8d24
commit
29d321b5e1
24 changed files with 128 additions and 314 deletions
|
@ -84,7 +84,6 @@ func newDumbBlock() *Block {
|
|||
Nonce: 1111,
|
||||
},
|
||||
Transactions: []*transaction.Transaction{
|
||||
transaction.NewMinerTX(),
|
||||
transaction.NewIssueTX(),
|
||||
},
|
||||
}
|
||||
|
@ -102,25 +101,9 @@ func TestBlockVerify(t *testing.T) {
|
|||
assert.Nil(t, block.RebuildMerkleRoot())
|
||||
assert.Nil(t, block.Verify())
|
||||
|
||||
block.Transactions = []*transaction.Transaction{
|
||||
transaction.NewIssueTX(),
|
||||
transaction.NewMinerTX(),
|
||||
}
|
||||
block.Transactions = []*transaction.Transaction{}
|
||||
assert.NoError(t, block.RebuildMerkleRoot())
|
||||
assert.NotNil(t, block.Verify())
|
||||
|
||||
block.Transactions = []*transaction.Transaction{
|
||||
transaction.NewIssueTX(),
|
||||
transaction.NewMinerTX(),
|
||||
}
|
||||
assert.NoError(t, block.RebuildMerkleRoot())
|
||||
assert.NotNil(t, block.Verify())
|
||||
block.Transactions = []*transaction.Transaction{
|
||||
transaction.NewMinerTX(),
|
||||
transaction.NewIssueTX(),
|
||||
transaction.NewIssueTX(),
|
||||
}
|
||||
assert.NotNil(t, block.Verify())
|
||||
assert.Nil(t, block.Verify())
|
||||
}
|
||||
|
||||
//TODO NEO3.0: Update binary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue