Skip to content

Commit 22ef95d

Browse files
committed
Merge bitcoin/bitcoin#31288: Add destroy to BlockTemplate schema
9aa5015 Add destroy to BlockTemplate schema (Sjors Provoost) Pull request description: This ensures that if a client no longer needs a block template, the node can clear its memory as soon as possible. A block template may hold on to transactions that are no longer in the mempool, so this can be significant. This has a trivial silent merge conflict with #31283 because it also used the number `@9` (gaps are not allowed). I'll rebase whichever is merged last. ACKs for top commit: TheCharlatan: Re-ACK 9aa5015 ryanofsky: Code review ACK 9aa5015 Tree-SHA512: 393571b4455969cba71c7572feaeff4503738205331ab198b9181c156c75eb65933a8e5ceff66fc06d1efb8f2528bdb254e5eee7df75735b912526de1e7b166d
2 parents f34fe08 + 9aa5015 commit 22ef95d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/ipc/capnp/mining.capnp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ interface Mining $Proxy.wrap("interfaces::Mining") {
2424
}
2525

2626
interface BlockTemplate $Proxy.wrap("interfaces::BlockTemplate") {
27-
getBlockHeader @0 (context: Proxy.Context) -> (result: Data);
28-
getBlock @1 (context: Proxy.Context) -> (result: Data);
29-
getTxFees @2 (context: Proxy.Context) -> (result: List(Int64));
30-
getTxSigops @3 (context: Proxy.Context) -> (result: List(Int64));
31-
getCoinbaseTx @4 (context: Proxy.Context) -> (result: Data);
32-
getCoinbaseCommitment @5 (context: Proxy.Context) -> (result: Data);
33-
getWitnessCommitmentIndex @6 (context: Proxy.Context) -> (result: Int32);
34-
getCoinbaseMerklePath @7 (context: Proxy.Context) -> (result: List(Data));
35-
submitSolution@8 (context: Proxy.Context, version: UInt32, timestamp: UInt32, nonce: UInt32, coinbase :Data) -> (result: Bool);
27+
destroy @0 (context :Proxy.Context) -> ();
28+
getBlockHeader @1 (context: Proxy.Context) -> (result: Data);
29+
getBlock @2 (context: Proxy.Context) -> (result: Data);
30+
getTxFees @3 (context: Proxy.Context) -> (result: List(Int64));
31+
getTxSigops @4 (context: Proxy.Context) -> (result: List(Int64));
32+
getCoinbaseTx @5 (context: Proxy.Context) -> (result: Data);
33+
getCoinbaseCommitment @6 (context: Proxy.Context) -> (result: Data);
34+
getWitnessCommitmentIndex @7 (context: Proxy.Context) -> (result: Int32);
35+
getCoinbaseMerklePath @8 (context: Proxy.Context) -> (result: List(Data));
36+
submitSolution @9 (context: Proxy.Context, version: UInt32, timestamp: UInt32, nonce: UInt32, coinbase :Data) -> (result: Bool);
3637
}
3738

3839
struct BlockCreateOptions $Proxy.wrap("node::BlockCreateOptions") {

0 commit comments

Comments
 (0)