mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-04 15:17:02 +00:00
drop BlockchainAware
This commit is contained in:
@@ -80,3 +80,13 @@ func (app *CounterApplication) Query(reqQuery types.RequestQuery) types.Response
|
||||
return types.ResponseQuery{Log: Fmt("Invalid query path. Expected hash or tx, got %v", reqQuery.Path)}
|
||||
}
|
||||
}
|
||||
|
||||
func (app *CounterApplication) InitChain(validators []*types.Validator) {
|
||||
}
|
||||
|
||||
func (app *CounterApplication) BeginBlock(hash []byte, header *types.Header) {
|
||||
}
|
||||
|
||||
func (app *CounterApplication) EndBlock(height uint64) types.ResponseEndBlock {
|
||||
return types.ResponseEndBlock{}
|
||||
}
|
||||
|
||||
@@ -70,3 +70,13 @@ func (app *DummyApplication) Query(reqQuery types.RequestQuery) (resQuery types.
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func (app *DummyApplication) InitChain(validators []*types.Validator) {
|
||||
}
|
||||
|
||||
func (app *DummyApplication) BeginBlock(hash []byte, header *types.Header) {
|
||||
}
|
||||
|
||||
func (app *DummyApplication) EndBlock(height uint64) types.ResponseEndBlock {
|
||||
return types.ResponseEndBlock{}
|
||||
}
|
||||
|
||||
@@ -180,14 +180,13 @@ func makeApplyBlock(t *testing.T, dummy types.Application, heightInt int, diff [
|
||||
Height: height,
|
||||
}
|
||||
|
||||
dummyChain := dummy.(types.BlockchainAware) // hmm...
|
||||
dummyChain.BeginBlock(hash, header)
|
||||
dummy.BeginBlock(hash, header)
|
||||
for _, tx := range txs {
|
||||
if r := dummy.DeliverTx(tx); r.IsErr() {
|
||||
t.Fatal(r)
|
||||
}
|
||||
}
|
||||
resEndBlock := dummyChain.EndBlock(height)
|
||||
resEndBlock := dummy.EndBlock(height)
|
||||
dummy.Commit()
|
||||
|
||||
valsEqual(t, diff, resEndBlock.Diffs)
|
||||
|
||||
@@ -34,3 +34,13 @@ func (app *NilApplication) Commit() types.Result {
|
||||
func (app *NilApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery) {
|
||||
return resQuery
|
||||
}
|
||||
|
||||
func (app *NilApplication) InitChain(validators []*types.Validator) {
|
||||
}
|
||||
|
||||
func (app *NilApplication) BeginBlock(hash []byte, header *types.Header) {
|
||||
}
|
||||
|
||||
func (app *NilApplication) EndBlock(height uint64) types.ResponseEndBlock {
|
||||
return types.ResponseEndBlock{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user