mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-25 10:41:41 +00:00
update for sdk2 libs. need to fix kv test
NOTE we only updating for tmlibs and abci
This commit is contained in:
@ -141,13 +141,7 @@ func (blockExec *BlockExecutor) Commit(block *types.Block) ([]byte, error) {
|
||||
blockExec.logger.Error("Client error during proxyAppConn.CommitSync", "err", err)
|
||||
return nil, err
|
||||
}
|
||||
if res.IsErr() {
|
||||
blockExec.logger.Error("Error in proxyAppConn.CommitSync", "err", res)
|
||||
return nil, res
|
||||
}
|
||||
if res.Log != "" {
|
||||
blockExec.logger.Debug("Commit.Log: " + res.Log)
|
||||
}
|
||||
// ResponseCommit has no error code - just data
|
||||
|
||||
blockExec.logger.Info("Committed state", "height", block.Height, "txs", block.NumTxs, "appHash", res.Data)
|
||||
|
||||
@ -198,10 +192,11 @@ func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus,
|
||||
}
|
||||
}
|
||||
|
||||
byzantineVals := make([]*abci.Evidence, len(block.Evidence.Evidence))
|
||||
// TODO: determine which validators were byzantine
|
||||
byzantineVals := make([]abci.Evidence, len(block.Evidence.Evidence))
|
||||
for i, ev := range block.Evidence.Evidence {
|
||||
byzantineVals[i] = &abci.Evidence{
|
||||
PubKey: ev.Address(), // XXX/TODO
|
||||
byzantineVals[i] = abci.Evidence{
|
||||
PubKey: ev.Address(), // XXX
|
||||
Height: ev.Height(),
|
||||
}
|
||||
}
|
||||
@ -243,7 +238,7 @@ func execBlockOnProxyApp(logger log.Logger, proxyAppConn proxy.AppConnConsensus,
|
||||
return abciResponses, nil
|
||||
}
|
||||
|
||||
func updateValidators(currentSet *types.ValidatorSet, updates []*abci.Validator) error {
|
||||
func updateValidators(currentSet *types.ValidatorSet, updates []abci.Validator) error {
|
||||
// If more or equal than 1/3 of total voting power changed in one block, then
|
||||
// a light client could never prove the transition externally. See
|
||||
// ./lite/doc.go for details on how a light client tracks validators.
|
||||
@ -293,7 +288,7 @@ func updateValidators(currentSet *types.ValidatorSet, updates []*abci.Validator)
|
||||
return nil
|
||||
}
|
||||
|
||||
func changeInVotingPowerMoreOrEqualToOneThird(currentSet *types.ValidatorSet, updates []*abci.Validator) (bool, error) {
|
||||
func changeInVotingPowerMoreOrEqualToOneThird(currentSet *types.ValidatorSet, updates []abci.Validator) (bool, error) {
|
||||
threshold := currentSet.TotalVotingPower() * 1 / 3
|
||||
acc := int64(0)
|
||||
|
||||
@ -424,12 +419,6 @@ func ExecCommitBlock(appConnConsensus proxy.AppConnConsensus, block *types.Block
|
||||
logger.Error("Client error during proxyAppConn.CommitSync", "err", res)
|
||||
return nil, err
|
||||
}
|
||||
if res.IsErr() {
|
||||
logger.Error("Error in proxyAppConn.CommitSync", "err", res)
|
||||
return nil, res
|
||||
}
|
||||
if res.Log != "" {
|
||||
logger.Info("Commit.Log: " + res.Log)
|
||||
}
|
||||
// ResponseCommit has no error or log, just data
|
||||
return res.Data, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user