@@ -844,3 +844,47 @@ async def test_stealing_fee(self, two_nodes):
844844 )
845845
846846 assert mempool_bundle is None
847+
848+ @pytest .mark .asyncio
849+ async def test_double_spend_same_bundle (self , two_nodes ):
850+ num_blocks = 2
851+ wallet_a = WalletTool ()
852+ coinbase_puzzlehash = wallet_a .get_new_puzzlehash ()
853+ wallet_receiver = WalletTool ()
854+ receiver_puzzlehash = wallet_receiver .get_new_puzzlehash ()
855+
856+ blocks = bt .get_consecutive_blocks (
857+ test_constants , num_blocks , [], 10 , b"" , coinbase_puzzlehash
858+ )
859+ full_node_1 , full_node_2 , server_1 , server_2 = two_nodes
860+
861+ block = blocks [1 ]
862+ async for _ in full_node_1 .respond_block (
863+ full_node_protocol .RespondBlock (block )
864+ ):
865+ pass
866+
867+ spend_bundle1 = wallet_a .generate_signed_transaction (
868+ 1000 , receiver_puzzlehash , block .header .data .coinbase
869+ )
870+
871+ assert spend_bundle1 is not None
872+
873+ other_receiver = WalletTool ()
874+ spend_bundle2 = wallet_a .generate_signed_transaction (
875+ 1000 , other_receiver .get_new_puzzlehash (), block .header .data .coinbase
876+ )
877+
878+ assert spend_bundle2 is not None
879+
880+ spend_bundle_combined = SpendBundle .aggregate ([spend_bundle1 , spend_bundle2 ])
881+
882+ tx : full_node_protocol .RespondTransaction = full_node_protocol .RespondTransaction (
883+ spend_bundle_combined
884+ )
885+ messages = []
886+ async for outbound in full_node_1 .respond_transaction (tx ):
887+ messages .append (outbound )
888+
889+ sb = full_node_1 .mempool_manager .get_spendbundle (spend_bundle_combined .name ())
890+ assert sb is None
0 commit comments