use request structs for InitChain and BeginBlock

This commit is contained in:
Ethan Buchman
2017-09-18 15:51:48 -04:00
parent a072429659
commit f279171a28
12 changed files with 56 additions and 54 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ func (app *ChainAwareApplication) Query(reqQuery types.RequestQuery) (resQuery t
}
}
func (app *ChainAwareApplication) BeginBlock(hash []byte, header *types.Header) {
func (app *ChainAwareApplication) BeginBlock(reqBeginBlock types.RequestBeginBlock) {
app.beginCount++
return
}
+1 -1
View File
@@ -37,7 +37,7 @@ func TestChainAware(t *testing.T) {
hash := []byte("fake block hash")
header := &types.Header{}
for i := uint64(0); i < n; i++ {
client.BeginBlockSync(hash, header)
client.BeginBlockSync(&types.RequestBeginBlock{hash, header})
client.EndBlockSync(i)
client.CommitSync()
}