コード例 #1
0
 async def push_tx(self, spend_bundle: SpendBundle) -> Tuple[MempoolInclusionStatus, Optional[Err]]:
     try:
         cost_result: NPCResult = await self.service.mempool_manager.pre_validate_spendbundle(
             spend_bundle, None, spend_bundle.name()
         )
     except ValidationError as e:
         return MempoolInclusionStatus.FAILED, e.code
     cost, status, error = await self.service.mempool_manager.add_spendbundle(
         spend_bundle, cost_result, spend_bundle.name()
     )
     return status, error
コード例 #2
0
ファイル: spend_sim.py プロジェクト: asah/chia-blockchain
 async def push_tx(
     self, spend_bundle: SpendBundle
 ) -> Tuple[MempoolInclusionStatus, Optional[Err]]:
     cost_result: NPCResult = await self.service.mempool_manager.pre_validate_spendbundle(
         spend_bundle)
     cost, status, error = await self.service.mempool_manager.add_spendbundle(
         spend_bundle, cost_result, spend_bundle.name())
     return status, error