From 973f9d1271cb27b4e04dabfbee6b53d08f4cf446 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Fri, 28 Dec 2018 12:21:37 +0530 Subject: [PATCH] Fixed minor bug for get signers from penalties header. --- core/state_transition.go | 2 +- internal/ethapi/api.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index a298f600b4..af558bbc7c 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -236,7 +236,7 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo contractAction = "contract creation" } else { // Increment the nonce for the next transaction - nonce = st.state.GetNonce(sender.Address())+1 + nonce = st.state.GetNonce(sender.Address()) + 1 st.state.SetNonce(sender.Address(), nonce) ret, st.gas, vmerr = evm.Call(sender, st.to().Address(), st.data, st.gas, st.value) contractAction = "contract call" diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index e3be62898c..04ffa77651 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -683,7 +683,7 @@ func (s *PublicBlockChainAPI) GetMasternodes(b *types.Block, ctx context.Context if prevCheckpointBlock != nil { masternodes = engine.GetMasternodesFromCheckpointHeader(prevCheckpointBlock.Header(), curBlockNumber, s.b.ChainConfig().XDPoS.Epoch) } - } else { + } else { log.Error("Undefined XDPoS consensus engine") } } @@ -980,7 +980,7 @@ func (s *PublicBlockChainAPI) rpcOutputBlockSigners(b *types.Block, ctx context. } } } - } else { + } else { log.Error("Undefined XDPoS consensus engine") } }