mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-24 18:21:38 +00:00
comments and cleanup
This commit is contained in:
@ -88,19 +88,14 @@ func execBlockOnProxyApp(eventCache types.Fireable, proxyAppConn proxy.AppConnCo
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fail.Fail() // XXX
|
||||
|
||||
// Run txs of block
|
||||
for _, tx := range block.Txs {
|
||||
fail.FailRand(len(block.Txs)) // XXX
|
||||
proxyAppConn.DeliverTxAsync(tx)
|
||||
if err := proxyAppConn.Error(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
fail.Fail() // XXX
|
||||
|
||||
// End block
|
||||
abciResponses.EndBlock, err = proxyAppConn.EndBlockSync(uint64(block.Height))
|
||||
if err != nil {
|
||||
@ -108,8 +103,6 @@ func execBlockOnProxyApp(eventCache types.Fireable, proxyAppConn proxy.AppConnCo
|
||||
return nil, err
|
||||
}
|
||||
|
||||
fail.Fail() // XXX
|
||||
|
||||
valDiff := abciResponses.EndBlock.Diffs
|
||||
|
||||
log.Info("Executed block", "height", block.Height, "valid txs", validTxs, "invalid txs", invalidTxs)
|
||||
@ -292,9 +285,8 @@ func (s *State) indexTxs(abciResponses *ABCIResponses) {
|
||||
s.TxIndexer.Batch(batch)
|
||||
}
|
||||
|
||||
// Apply and commit a block, but without all the state validation.
|
||||
// Apply and commit a block on the proxyApp without validating or mutating the state
|
||||
// Returns the application root hash (result of abci.Commit)
|
||||
// TODO handle abciResponses
|
||||
func ApplyBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block) ([]byte, error) {
|
||||
var eventCache types.Fireable // nil
|
||||
_, err := execBlockOnProxyApp(eventCache, appConnConsensus, block)
|
||||
|
Reference in New Issue
Block a user