mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
parent
adfbabc847
commit
e9da4ca95b
4 changed files with 4 additions and 6 deletions
|
|
@ -253,7 +253,6 @@ func GenM2FromRandomize(randomizes []int64, lenSigners int64) ([]int64, error) {
|
|||
blockValidator := NewSlice(int64(0), lenSigners, 1)
|
||||
randIndexs := make([]int64, lenSigners)
|
||||
total := int64(0)
|
||||
var temp int64 = 0
|
||||
for _, j := range randomizes {
|
||||
total += j
|
||||
}
|
||||
|
|
@ -264,7 +263,7 @@ func GenM2FromRandomize(randomizes []int64, lenSigners int64) ([]int64, error) {
|
|||
blockLength = 1
|
||||
}
|
||||
randomIndex := int64(rand.Intn(blockLength))
|
||||
temp = blockValidator[randomIndex]
|
||||
temp := blockValidator[randomIndex]
|
||||
blockValidator[randomIndex] = blockValidator[i]
|
||||
blockValidator[i] = temp
|
||||
blockValidator = append(blockValidator[:i], blockValidator[i+1:]...)
|
||||
|
|
|
|||
|
|
@ -244,7 +244,6 @@ func GetRewardBalancesRate(foudationWalletAddr common.Address, masterAddr common
|
|||
}
|
||||
|
||||
func GetCandidatesOwnerBySigner(validator *contractValidator.XDCValidator, signerAddr common.Address) common.Address {
|
||||
owner := signerAddr
|
||||
opts := new(bind.CallOpts)
|
||||
owner, err := validator.GetCandidateOwner(opts, signerAddr)
|
||||
if err != nil {
|
||||
|
|
@ -254,6 +253,7 @@ func GetCandidatesOwnerBySigner(validator *contractValidator.XDCValidator, signe
|
|||
|
||||
return owner
|
||||
}
|
||||
|
||||
func toyVoteTx(t *testing.T, nonce uint64, amount *big.Int, to, addr common.Address) *types.Transaction {
|
||||
vote := "6dd7d8ea" // VoteMethod = "0x6dd7d8ea"
|
||||
action := fmt.Sprintf("%s%s%s", vote, "000000000000000000000000", addr.String()[3:])
|
||||
|
|
|
|||
|
|
@ -3078,8 +3078,8 @@ func (bc *BlockChain) processTradingAndLendingStates(isValidBlockNumber bool, bl
|
|||
return tradingState, lendingState, fmt.Errorf("failed to ProcessLiquidationData. Err: %v", err)
|
||||
}
|
||||
if tradingService.IsSDKNode() {
|
||||
finalizedTx := lendingstate.FinalizedResult{}
|
||||
if finalizedTx, err = ExtractLendingFinalizedTradeTransactions(block.Transactions()); err != nil {
|
||||
finalizedTx, err := ExtractLendingFinalizedTradeTransactions(block.Transactions())
|
||||
if err != nil {
|
||||
return tradingState, lendingState, err
|
||||
}
|
||||
bc.AddFinalizedTrades(finalizedTx.TxHash, finalizedTrades)
|
||||
|
|
|
|||
|
|
@ -919,7 +919,6 @@ func (mrp *MultiRangeProof) Deserialize(proof []byte) error {
|
|||
offset += 32
|
||||
|
||||
mrp.Cx = new(big.Int).SetBytes(proof[offset : offset+32])
|
||||
offset += 32
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue