MCPcopy Create free account
hub / github.com/bcndev/bytecoin / Block

Method Block

src/Core/BlockChain.cpp:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39// We store cumulative_difficulty->bid for bids with no children
40
41Block::Block(const RawBlock &rb) {
42 BlockTemplate &bheader = header;
43 seria::from_binary(bheader, rb.block);
44 transactions.reserve(rb.transactions.size());
45 for (auto &&raw_transaction : rb.transactions) {
46 Transaction transaction;
47 seria::from_binary(transaction, raw_transaction);
48 transactions.push_back(std::move(transaction));
49 }
50}
51
52PreparedBlock::PreparedBlock(BinaryArray &&ba, const Currency &currency, crypto::CryptoNightContext *context)
53 : block_data(std::move(ba)) {

Callers

nothing calls this directly

Calls 2

from_binaryFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected