We have a mock bitcoin core rpc server which we use for tests. We want to use fundrawtransaction, but to do so, we need to implement Deserialize on FundRawTransactionOptions so that during testing, the test server can deserialize the RPC arguments.
It isn't possible to #[derive(Deserialize)] on FundRawTransactionOptions because the change_address field is an Option<Address>, and Address doesn't implement Deserialize, only Address<NetworkUnchecked> implements Deserialize.
We have a mock bitcoin core rpc server which we use for tests. We want to use
fundrawtransaction
, but to do so, we need to implementDeserialize
onFundRawTransactionOptions
so that during testing, the test server can deserialize the RPC arguments.It isn't possible to
#[derive(Deserialize)]
onFundRawTransactionOptions
because thechange_address
field is anOption<Address>
, andAddress
doesn't implementDeserialize
, onlyAddress<NetworkUnchecked>
implementsDeserialize
.Is there a workaround for this?