MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / SaveTxIndex

Function SaveTxIndex

src/main.cpp:875–881  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

873}
874
875bool SaveTxIndex(const uint256 &txid, CCacheWrapper &cw, CValidationState &state, const CDiskTxPos &diskTxPos) {
876 if (SysCfg().IsTxIndex()) {
877 if (!cw.blockCache.SetTxIndex(txid, diskTxPos))
878 return state.Abort(_("Failed to write transaction index"));
879 }
880 return true;
881}
882
883// compute vote staking interest && revoke votes
884static bool ComputeVoteStakingInterestAndRevokeVotes(const uint256& blockHash, const int32_t currHeight, const uint32_t currBlockTime,

Callers 1

ConnectBlockFunction · 0.85

Calls 4

_Function · 0.85
IsTxIndexMethod · 0.80
AbortMethod · 0.80
SetTxIndexMethod · 0.45

Tested by

no test coverage detected