aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2012-11-08 16:26:25 -0500
committerMatt Corallo <git@bluematt.me>2013-01-16 14:34:06 -0500
commit21aaf255ff4553ae538fb90011b0185bc8039896 (patch)
tree5802725fb5756bac265ef7f7d4cef9d6083781a7 /src/main.h
parent4bedfa9223d38bbc322d19e28ca03417c216700b (diff)
Use CPartialMerkleTree for CMerkleBlock transactions.
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.h b/src/main.h
index f6086e92c2..4d21680b9c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -2140,12 +2140,14 @@ struct CBlockTemplate
class CMerkleBlock
{
public:
+ // Public only for unit testing
CBlockHeader header;
+ CPartialMerkleTree txn;
- // We could optimize this a bit to deduplicate partial branches,
- // but it's not worth much unless a node has a ton of txes in a single block
- // tx index , tx hash, merkle branch
- std::vector<boost::tuple<unsigned int, uint256, std::vector<uint256> > > vtx;
+public:
+ // Public only for unit testing and relay testing
+ // (not relayed)
+ std::vector<std::pair<unsigned int, uint256> > vMatchedTxn;
// Create from a CBlock, filtering transactions according to filter
// Note that this will call IsRelevantAndUpdate on the filter for each transaction,
@@ -2155,7 +2157,7 @@ public:
IMPLEMENT_SERIALIZE
(
READWRITE(header);
- READWRITE(vtx);
+ READWRITE(txn);
)
};