MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / nextNonce

Method nextNonce

blockproducer/metastate.go:478–494  ·  view source on GitHub ↗
(addr proto.AccountAddress)

Source from the content-addressed store, hash-verified

476}
477
478func (s *metaState) nextNonce(addr proto.AccountAddress) (nonce pi.AccountNonce, err error) {
479 var (
480 o *types.Account
481 loaded bool
482 )
483 if o, loaded = s.dirty.accounts[addr]; !loaded {
484 if o, loaded = s.readonly.accounts[addr]; !loaded {
485 err = ErrAccountNotFound
486 log.WithFields(log.Fields{
487 "addr": addr,
488 }).WithError(err).Error("unexpected error")
489 return
490 }
491 }
492 nonce = o.NextNonce
493 return
494}
495
496func (s *metaState) increaseNonce(addr proto.AccountAddress) (err error) {
497 var (

Callers 1

applyMethod · 0.95

Calls 3

WithFieldsFunction · 0.92
ErrorMethod · 0.80
WithErrorMethod · 0.80

Tested by

no test coverage detected