diff options
Diffstat (limited to 'src/index/txindex.cpp')
-rw-r--r-- | src/index/txindex.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index c85030e18e..224004ce1c 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -245,6 +245,9 @@ bool TxIndex::Init() bool TxIndex::WriteBlock(const CBlock& block, const CBlockIndex* pindex) { + // Exclude genesis block transaction because outputs are not spendable. + if (pindex->nHeight == 0) return true; + CDiskTxPos pos(pindex->GetBlockPos(), GetSizeOfCompactSize(block.vtx.size())); std::vector<std::pair<uint256, CDiskTxPos>> vPos; vPos.reserve(block.vtx.size()); |