diff --git a/btcjson/chainsvrresults.go b/btcjson/chainsvrresults.go index e5ed0e1e68b..8f59f776766 100644 --- a/btcjson/chainsvrresults.go +++ b/btcjson/chainsvrresults.go @@ -900,10 +900,14 @@ type TestMempoolAcceptFees struct { // EffectiveFeeRate specifies the effective feerate in BTC per KvB. May // differ from the base feerate if, for example, there are modified // fees from prioritisetransaction or a package feerate was used. + // + // NOTE: this field only exists in bitcoind v25.0 and above. EffectiveFeeRate float64 `json:"effective-feerate"` // EffectiveIncludes specifies transactions whose fees and vsizes are // included in effective-feerate. Each item is a transaction wtxid in // hex. + // + // NOTE: this field only exists in bitcoind v25.0 and above. EffectiveIncludes []string `json:"effective-includes"` } diff --git a/rpcclient/infrastructure.go b/rpcclient/infrastructure.go index 7c90e9dd064..3de82c5d085 100644 --- a/rpcclient/infrastructure.go +++ b/rpcclient/infrastructure.go @@ -110,10 +110,14 @@ const ( // BitcoindPre19 represents a bitcoind version before 0.19.0. BitcoindPre19 BackendVersion = iota - // BitcoindPost19 represents a bitcoind version equal to or greater than - // 0.19.0. + // BitcoindPost19 represents a bitcoind version equal to or greater + // than 0.19.0. BitcoindPost19 + // BitcoindPost22 represents a bitcoind version equal to or greater + // than 22.0.0. + BitcoindPost22 + // BitcoindPost25 represents a bitcoind version equal to or greater // than 25.0.0. BitcoindPost25 @@ -129,7 +133,10 @@ func (b BackendVersion) String() string { return "bitcoind 0.19 and below" case BitcoindPost19: - return "bitcoind v0.19-v0.25" + return "bitcoind v0.19-v0.22" + + case BitcoindPost22: + return "bitcoind v0.22-v0.25" case BitcoindPost25: return "bitcoind v0.25 and above" diff --git a/rpcclient/rawtransactions.go b/rpcclient/rawtransactions.go index b23859304e0..f445c0dc6df 100644 --- a/rpcclient/rawtransactions.go +++ b/rpcclient/rawtransactions.go @@ -927,8 +927,8 @@ func (c *Client) TestMempoolAcceptAsync(txns []*wire.MsgTx, log.Debugf("TestMempoolAcceptAsync: backend version %s", version) - // Exit early if the version is below 25.0.0. - if version < BitcoindPost25 { + // Exit early if the version is below 22.0.0. + if version < BitcoindPost22 { err := fmt.Errorf("%w: %v", ErrBitcoindVersion, version) return newFutureError(err) }