MCPcopy Create free account
hub / github.com/CPChain/chain / countTransactions

Function countTransactions

core/blockchain.go:1618–1623  ·  view source on GitHub ↗
(chain []*types.Block)

Source from the content-addressed store, hash-verified

1616}
1617
1618func countTransactions(chain []*types.Block) (c int) {
1619 for _, b := range chain {
1620 c += len(b.Transactions())
1621 }
1622 return c
1623}
1624
1625// reorgs takes two blocks, an old chain and a new chain and will reconstruct the blocks and inserts them
1626// to be part of the new canonical chain and accumulates potential missing transactions and post an

Callers 1

reportMethod · 0.85

Calls 1

TransactionsMethod · 0.80

Tested by

no test coverage detected