mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 20:21:56 +00:00
add proposer address to block's Header
Refs #1134 Validation: - ignored in block.ValidateBasic since it's stateful information - checked in blockExec.ValidateBlock
This commit is contained in:
committed by
Ethan Buchman
parent
06a157ad06
commit
bec9d5cba9
@@ -4,6 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/tendermint/tendermint/crypto/ed25519"
|
||||
dbm "github.com/tendermint/tendermint/libs/db"
|
||||
"github.com/tendermint/tendermint/libs/log"
|
||||
)
|
||||
@@ -65,4 +66,10 @@ func TestValidateBlock(t *testing.T) {
|
||||
block.ValidatorsHash = []byte("wrong validators hash")
|
||||
err = blockExec.ValidateBlock(state, block)
|
||||
require.Error(t, err)
|
||||
|
||||
// wrong proposer address
|
||||
block = makeBlock(state, 1)
|
||||
block.ProposerAddress = ed25519.GenPrivKey().PubKey().Address()
|
||||
err = blockExec.ValidateBlock(state, block)
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user