diff --git a/consensus/posv/posv.go b/consensus/posv/posv.go index 7fd611fb85..cff6bf6c9c 100644 --- a/consensus/posv/posv.go +++ b/consensus/posv/posv.go @@ -876,7 +876,7 @@ func (c *Posv) Finalize(chain consensus.ChainReader, header *types.Header, state } if b == types.ReceiptStatusFailed { - fmt.Println("Tx receipt status false") + fmt.Println("Tx receipt status false", tx.Hash().Hex()) continue } @@ -896,6 +896,7 @@ func (c *Posv) Finalize(chain consensus.ChainReader, header *types.Header, state vote.Masternode = *addr vote.Voter = *tx.From() + fmt.Println("Remove from Votes cache", vote.Masternode.String(), vote.Voter.String()) c.Votes.Remove(vote) } } diff --git a/contracts/utils.go b/contracts/utils.go index b42df94207..7a1a40389d 100644 --- a/contracts/utils.go +++ b/contracts/utils.go @@ -488,12 +488,12 @@ func GetRewardBalancesRate(c *posv.Posv, foudationWalletAddr common.Address, mas voterCap = vCap.(*big.Int) } else { voterCap, err = validator.GetVoterCap(opts, masterAddr, voteAddr) + if err != nil { + log.Crit("Fail to get vote capacity", "error", err) + } + fmt.Println("Add to Votes cache", vote.Masternode.String(), vote.Voter.String(), voterCap.String()) c.Votes.Add(vote, voterCap) } - if err != nil { - log.Error("Fail to get vote capacity", "error", err) - return nil, err - } totalCap.Add(totalCap, voterCap) voterCaps[voteAddr] = voterCap