Skip to content

Commit 1f6526a

Browse files
committed
updates
1 parent 3879d73 commit 1f6526a

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

types/state_test.go

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,27 @@ func TestAssertValidForNextState(t *testing.T) {
111111
data: &Data{},
112112
expectedError: "dataHash from the header does not match with hash",
113113
},
114-
"last header hash mismatch": {
114+
"last header hash mismatch (first time)": {
115+
state: State{
116+
ChainID: "test-chain",
117+
LastHeaderHash: []byte("hash"),
118+
LastBlockHeight: 1,
119+
LastBlockTime: now,
120+
},
121+
header: &SignedHeader{
122+
Header: Header{
123+
BaseHeader: BaseHeader{
124+
ChainID: "test-chain", Height: 2,
125+
Time: nowUnixNano,
126+
},
127+
DataHash: dataHashForEmptyTxs,
128+
LastHeaderHash: []byte("other-hash"),
129+
},
130+
},
131+
data: &Data{},
132+
expectedError: "",
133+
},
134+
"last header hash mismatch (second time)": {
115135
state: State{
116136
ChainID: "test-chain",
117137
LastHeaderHash: []byte("hash"),

0 commit comments

Comments
 (0)