mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-01 08:44:02 +02:00
ipc mining: provide default option values (incompatible schema change)
This change copies default option values from the C++ mining interface to the Cap'n Proto interface. Currently, no capnp default values are set, so they are implicitly all false or 0, which is inconvenient for the rust and python clients and inconsistent with the C++ client. Warning: This is an intermediate, review-only commit. Binaries built from it should not be distributed or used to connect to other clients or servers. It makes incompatible changes to the `mining.capnp` schema without updating the `Init.makeMining` version, causing binaries to advertise support for a schema they do not actually implement. Mixed versions may therefore exchange garbage requests/responses instead of producing clear errors. The final commit in this series bumps the mining interface number to ensure mismatches are detected. git-bisect-skip: yes
This commit is contained in:
@@ -21,7 +21,7 @@ interface Mining $Proxy.wrap("interfaces::Mining") {
|
||||
isTestChain @0 (context :Proxy.Context) -> (result: Bool);
|
||||
isInitialBlockDownload @1 (context :Proxy.Context) -> (result: Bool);
|
||||
getTip @2 (context :Proxy.Context) -> (result: Common.BlockRef, hasResult: Bool);
|
||||
waitTipChanged @3 (context :Proxy.Context, currentTip: Data, timeout: Float64) -> (result: Common.BlockRef);
|
||||
waitTipChanged @3 (context :Proxy.Context, currentTip: Data, timeout: Float64 = .maxDouble) -> (result: Common.BlockRef);
|
||||
createNewBlock @4 (options: BlockCreateOptions) -> (result: BlockTemplate);
|
||||
checkBlock @5 (block: Data, options: BlockCheckOptions) -> (reason: Text, debug: Text, result: Bool);
|
||||
}
|
||||
@@ -43,19 +43,19 @@ interface BlockTemplate $Proxy.wrap("interfaces::BlockTemplate") {
|
||||
}
|
||||
|
||||
struct BlockCreateOptions $Proxy.wrap("node::BlockCreateOptions") {
|
||||
useMempool @0 :Bool $Proxy.name("use_mempool");
|
||||
blockReservedWeight @1 :UInt64 $Proxy.name("block_reserved_weight");
|
||||
coinbaseOutputMaxAdditionalSigops @2 :UInt64 $Proxy.name("coinbase_output_max_additional_sigops");
|
||||
useMempool @0 :Bool = true $Proxy.name("use_mempool");
|
||||
blockReservedWeight @1 :UInt64 = .defaultBlockReservedWeight $Proxy.name("block_reserved_weight");
|
||||
coinbaseOutputMaxAdditionalSigops @2 :UInt64 = .defaultCoinbaseOutputMaxAdditionalSigops $Proxy.name("coinbase_output_max_additional_sigops");
|
||||
}
|
||||
|
||||
struct BlockWaitOptions $Proxy.wrap("node::BlockWaitOptions") {
|
||||
timeout @0 : Float64 $Proxy.name("timeout");
|
||||
feeThreshold @1 : Int64 $Proxy.name("fee_threshold");
|
||||
timeout @0 : Float64 = .maxDouble $Proxy.name("timeout");
|
||||
feeThreshold @1 : Int64 = .maxMoney $Proxy.name("fee_threshold");
|
||||
}
|
||||
|
||||
struct BlockCheckOptions $Proxy.wrap("node::BlockCheckOptions") {
|
||||
checkMerkleRoot @0 :Bool $Proxy.name("check_merkle_root");
|
||||
checkPow @1 :Bool $Proxy.name("check_pow");
|
||||
checkMerkleRoot @0 :Bool = true $Proxy.name("check_merkle_root");
|
||||
checkPow @1 :Bool = true $Proxy.name("check_pow");
|
||||
}
|
||||
|
||||
struct CoinbaseTx $Proxy.wrap("node::CoinbaseTx") {
|
||||
|
||||
Reference in New Issue
Block a user