@@ -845,6 +845,51 @@ pub struct TestMempoolAcceptResult {
845
845
pub fees : Option < TestMempoolAcceptResultFees > ,
846
846
}
847
847
848
+ #[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
849
+ pub struct SubmitPackageResult {
850
+ /// Transaction results keyed by wtxid.
851
+ #[ serde( rename = "tx-results" ) ]
852
+ pub tx_results : HashMap < bitcoin:: Wtxid , TxResult > ,
853
+
854
+ /// List of txids of replaced transactions.
855
+ #[ serde( rename = "replaced-transactions" ) ]
856
+ pub replaced_transactions : Vec < bitcoin:: Txid > ,
857
+ }
858
+
859
+ #[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
860
+ pub struct TxResult {
861
+ pub txid : bitcoin:: Txid ,
862
+
863
+ /// The wtxid of a different transaction with the same txid but different
864
+ /// witness found in the mempool. This means the submitted transaction was
865
+ /// ignored.
866
+ #[ serde( rename = "other-wtxid" ) ]
867
+ pub other_wtxid : Option < bitcoin:: Wtxid > ,
868
+
869
+ /// Virtual transaction size as defined in BIP 141.
870
+ pub vsize : u64 ,
871
+
872
+ pub fees : Fees ,
873
+ }
874
+
875
+ #[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
876
+ pub struct Fees {
877
+ /// Transaction fee.
878
+ #[ serde( with = "bitcoin::amount::serde::as_btc" ) ]
879
+ pub base : Amount ,
880
+
881
+ /// If the transaction was not already in the mempool, the effective feerate
882
+ /// in BTC per KvB. For example, the package feerate and/or feerate with
883
+ /// modified fees from prioritisetransaction.
884
+ #[ serde( default , rename = "effective-feerate" , with = "bitcoin::amount::serde::as_btc::opt" ) ]
885
+ pub effective_feerate : Option < Amount > ,
886
+
887
+ /// If effective-feerate is provided, the wtxids of the transactions whose
888
+ /// fees and vsizes are included in effective-feerate.
889
+ #[ serde( rename = "effective-includes" ) ]
890
+ pub effective_includes : Option < Vec < bitcoin:: Wtxid > > ,
891
+ }
892
+
848
893
#[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
849
894
pub struct TestMempoolAcceptResultFees {
850
895
/// Transaction fee in BTC
0 commit comments