MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / loadOrStoreAccountObject

Method loadOrStoreAccountObject

blockproducer/metastate.go:83–94  ·  view source on GitHub ↗
(
	k proto.AccountAddress, v *types.Account)

Source from the content-addressed store, hash-verified

81}
82
83func (s *metaState) loadOrStoreAccountObject(
84 k proto.AccountAddress, v *types.Account) (o *types.Account, loaded bool,
85) {
86 if o, loaded = s.dirty.accounts[k]; loaded && o != nil {
87 return
88 }
89 if o, loaded = s.readonly.accounts[k]; loaded {
90 return
91 }
92 s.dirty.accounts[k] = v
93 return
94}
95
96func (s *metaState) loadAccountTokenBalance(addr proto.AccountAddress,
97 tokenType types.TokenType) (b uint64, loaded bool) {

Callers 4

storeBaseAccountMethod · 0.95
transferAccountTokenMethod · 0.95
TestChainFunction · 0.80
TestMetaStateFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestChainFunction · 0.64
TestMetaStateFunction · 0.64