diff options
| author | Eric Lombrozo <[email protected]> | 2013-06-23 17:35:01 -0700 |
|---|---|---|
| committer | Eric Lombrozo <[email protected]> | 2013-06-23 19:58:23 -0700 |
| commit | a6dba0fdb281ee99e6814ad64c1c4d3032347816 (patch) | |
| tree | cd0b5e67aea0f2b47ff3faf7719328c1680bbe4c /src/main.cpp | |
| parent | Merge pull request #2783 from sipa/newtxindex (diff) | |
| download | discoin-a6dba0fdb281ee99e6814ad64c1c4d3032347816.tar.xz discoin-a6dba0fdb281ee99e6814ad64c1c4d3032347816.zip | |
Moved CBlock::WriteToDisk out of CBlock to inline function WriteBlockToDisk in main.h
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5c9aa3202..bde9d6603 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2262,7 +2262,7 @@ bool CBlock::AcceptBlock(CValidationState &state, CDiskBlockPos *dbp) if (!FindBlockPos(state, blockPos, nBlockSize+8, nHeight, nTime, dbp != NULL)) return error("AcceptBlock() : FindBlockPos failed"); if (dbp == NULL) - if (!WriteToDisk(blockPos)) + if (!WriteBlockToDisk(*this, blockPos)) return state.Abort(_("Failed to write block")); if (!AddToBlockIndex(state, blockPos)) return error("AcceptBlock() : AddToBlockIndex failed"); @@ -2800,7 +2800,7 @@ bool InitBlockIndex() { CValidationState state; if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.nTime)) return error("LoadBlockIndex() : FindBlockPos failed"); - if (!block.WriteToDisk(blockPos)) + if (!WriteBlockToDisk(block, blockPos)) return error("LoadBlockIndex() : writing genesis block to disk failed"); if (!block.AddToBlockIndex(state, blockPos)) return error("LoadBlockIndex() : genesis block not accepted"); |