mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Remove/inline ReadRawBlockFromDisk(block_data, pindex, message_start)
This commit is contained in:
parent
eaeeb88768
commit
5d59ae0ba8
3 changed files with 1 additions and 13 deletions
|
|
@ -1880,7 +1880,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
|
|||
// Fast-path: in this case it is possible to serve the block directly from disk,
|
||||
// as the network format matches the format on disk
|
||||
std::vector<uint8_t> block_data;
|
||||
if (!ReadRawBlockFromDisk(block_data, pindex, m_chainparams.MessageStart())) {
|
||||
if (!ReadRawBlockFromDisk(block_data, pindex->GetBlockPos(), m_chainparams.MessageStart())) {
|
||||
assert(!"cannot load block from disk");
|
||||
}
|
||||
m_connman.PushMessage(&pfrom, msgMaker.Make(NetMsgType::BLOCK, Span{block_data}));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue