-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugFix/account-wrap-is-nil #1835
Conversation
…mall piece of information - what is the main cause.
data/state/journalEntries.go
Outdated
@@ -101,7 +103,7 @@ type journalEntryDataTrieUpdates struct { | |||
// NewJournalEntryDataTrieUpdates outputs a new JournalEntryDataTrieUpdates implementation used to revert an account's data trie | |||
func NewJournalEntryDataTrieUpdates(trieUpdates map[string][]byte, account baseAccountHandler) (*journalEntryDataTrieUpdates, error) { | |||
if check.IfNil(account) { | |||
return nil, ErrNilAccountHandler | |||
return nil, fmt.Errorf("%w in NewJournalEntryAccount", ErrNilAccountHandler) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NewJournalEntryDataTrieUpdates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
@@ -165,7 +165,7 @@ func (stp *stakingToPeer) UpdateProtocol(body *block.Body, nonce uint64) error { | |||
if len(data) == 0 { | |||
err = stp.peerState.RemoveAccount(blsPubKey) | |||
if err != nil { | |||
return err | |||
log.Debug("staking to protocol RemoveAccount error", "err", err, "blsPubKey", blsPubKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log.Error ? and "staking to protocol RemoveAccount failed" to avoid displaying twice "error" and "err"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will put to log.logiferror.
@@ -258,7 +258,7 @@ func (sc *scProcessor) ExecuteSmartContractTransaction( | |||
var results []data.TransactionHandler | |||
results, consumedFee, err = sc.processVMOutput(vmOutput, txHash, tx, acntSnd, vmInput.CallType) | |||
if err != nil { | |||
log.Trace("process vm output error", "error", err.Error()) | |||
log.Trace("process vm output returned with problem ", "err", err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be log.Debug ? and "process vm output failed" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need. for any sc fail you would get a lot of messages. which are not needed.
vm/systemSmartContracts/auction.go
Outdated
@@ -471,7 +467,7 @@ func (s *stakingAuctionSC) registerBLSKeys( | |||
) ([][]byte, error) { | |||
maxNodesToRun := big.NewInt(0).SetBytes(args[0]).Uint64() | |||
if uint64(len(args)) < maxNodesToRun+1 { | |||
log.Debug("not enough arguments to process stake function") | |||
s.eei.AddReturnMessage("not enough arguments to process stake function") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the same pattern used in this file:
s.eei.AddReturnMessage(fmt.Sprintf("not enough arguments to process stake function: expected min %d, got %d", maxNodesToRun+1, len(args)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
the error is from stakingToPeer RemoveAccount call. Still missing a small piece of information - what is the main cause.