From 5ecec087ef12ec49c4ab482200a025c362b1d256 Mon Sep 17 00:00:00 2001 From: Edgar Aroutiounian Date: Mon, 5 Jul 2021 12:31:53 -0400 Subject: [PATCH] GetPendingStateProposals not called --- consensus/bor/bor.go | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/consensus/bor/bor.go b/consensus/bor/bor.go index 5b2bf3aa72a7..4f8393982f40 100644 --- a/consensus/bor/bor.go +++ b/consensus/bor/bor.go @@ -1070,40 +1070,6 @@ func (c *Bor) fetchAndCommitSpan( return applyMessage(msg, state, header, c.chainConfig, chain) } -// GetPendingStateProposals get pending state proposals -func (c *Bor) GetPendingStateProposals(snapshotNumber uint64) ([]*big.Int, error) { - // block - blockNr := rpc.BlockNumber(snapshotNumber) - - // method - method := "getPendingStates" - - data, err := c.stateReceiverABI.Pack(method) - if err != nil { - log.Error("Unable to pack tx for getPendingStates", "error", err) - return nil, err - } - - msgData := (hexutil.Bytes)(data) - toAddress := common.HexToAddress(c.config.StateReceiverContract) - gas := (hexutil.Uint64)(uint64(math.MaxUint64 / 2)) - result, err := c.ethAPI.Call(context.Background(), ethapi.CallArgs{ - Gas: &gas, - To: &toAddress, - Data: &msgData, - }, rpc.BlockNumberOrHash{BlockNumber: &blockNr}, nil) - if err != nil { - return nil, err - } - - var ret = new([]*big.Int) - if err = c.stateReceiverABI.UnpackIntoInterface(ret, method, result); err != nil { - return nil, err - } - - return *ret, nil -} - // CommitStates commit states func (c *Bor) CommitStates( state *state.StateDB,