MCPcopy Create free account
hub / github.com/DNAProject/DNA / SaveTransaction

Method SaveTransaction

core/store/ledgerstore/block_store.go:355–360  ·  view source on GitHub ↗

SaveTransaction persist transaction to store

(tx *types.Transaction, height uint32)

Source from the content-addressed store, hash-verified

353
354//SaveTransaction persist transaction to store
355func (this *BlockStore) SaveTransaction(tx *types.Transaction, height uint32) {
356 if this.enableCache {
357 this.cache.AddTransaction(tx, height)
358 }
359 this.putTransaction(tx, height)
360}
361
362func (this *BlockStore) putTransaction(tx *types.Transaction, height uint32) {
363 txHash := tx.Hash()

Callers 2

SaveBlockMethod · 0.95
TestSaveTransactionFunction · 0.80

Calls 2

putTransactionMethod · 0.95
AddTransactionMethod · 0.80

Tested by 1

TestSaveTransactionFunction · 0.64