MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / merge

Method merge

src/thinblock.cpp:29–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29void ThinTx::merge(const ThinTx& tx) {
30 if (hasFull())
31 return;
32
33 if (tx.hasFull()) {
34 full_ = tx.full();
35 cheap_ = tx.cheap();
36 return;
37 }
38
39 if (!hasCheap() && tx.hasCheap())
40 cheap_ = tx.cheap();
41
42 if (hasObfuscated())
43 return;
44
45 if (!tx.hasObfuscated())
46 return;
47
48 obfuscated_ = tx.obfuscated_;
49}
50
51bool ThinTx::hasFull() const {
52 return !full_.IsNull();

Callers 1

replaceWantedTxMethod · 0.80

Calls 3

hasFullMethod · 0.80
hasCheapMethod · 0.80
hasObfuscatedMethod · 0.80

Tested by

no test coverage detected