def create_spam_block(self, hashPrevBlock, stakingPrevOuts, height, fStakeDoubleSpent=False, fZPoS=False, spendingPrevOuts={}):
    ' creates a block to spam the network with\n        :param   hashPrevBlock:      (hex string) hash of previous block\n                 stakingPrevOuts:    ({COutPoint --> (int, int, int, str)} dictionary)\n                                      map outpoints (to be used as staking inputs) to amount, block_time, nStakeModifier, hashStake\n                 height:             (int) block height\n                 fStakeDoubleSpent:  (bool) spend the coinstake input inside the block\n                 fZPoS:              (bool) stake the block with zerocoin\n                 spendingPrevOuts:   ({COutPoint --> (int, int, int, str)} dictionary)\n                                      map outpoints (to be used as tx inputs) to amount, block_time, nStakeModifier, hashStake\n        :return  block:              (CBlock) generated block\n        '
    if (len(spendingPrevOuts) == 0):
        spendingPrevOuts = dict(stakingPrevOuts)
    current_time = int(time.time())
    nTime = (current_time & 4294967280)
    coinbase = create_coinbase(height)
    coinbase.vout[0].nValue = 0
    coinbase.vout[0].scriptPubKey = b''
    coinbase.nTime = nTime
    coinbase.rehash()
    block = create_block(int(hashPrevBlock, 16), coinbase, nTime)
    if (not block.solve_stake(stakingPrevOuts)):
        raise Exception('Not able to solve for any prev_outpoint')
    signed_stake_tx = self.sign_stake_tx(block, stakingPrevOuts[block.prevoutStake][0], fZPoS)
    block.vtx.append(signed_stake_tx)
    if ((not fZPoS) and (not fStakeDoubleSpent)):
        del spendingPrevOuts[block.prevoutStake]
    if (len(spendingPrevOuts) > 0):
        del spendingPrevOuts[choice(list(spendingPrevOuts))]
    for outPoint in spendingPrevOuts:
        value_out = int((spendingPrevOuts[outPoint][0] - (self.DEFAULT_FEE * COIN)))
        tx = create_transaction(outPoint, b'', value_out, nTime, scriptPubKey=CScript([self.block_sig_key.get_pubkey(), OP_CHECKSIG]))
        signed_tx_hex = self.node.signrawtransaction(bytes_to_hex_str(tx.serialize()))['hex']
        signed_tx = CTransaction()
        signed_tx.deserialize(BytesIO(hex_str_to_bytes(signed_tx_hex)))
        block.vtx.append(signed_tx)
    block.hashMerkleRoot = block.calc_merkle_root()
    block.rehash()
    block.sign_block(self.block_sig_key)
    return block
creates a block to spam the network with
:param   hashPrevBlock:      (hex string) hash of previous block
         stakingPrevOuts:    ({COutPoint --> (int, int, int, str)} dictionary)
                              map outpoints (to be used as staking inputs) to amount, block_time, nStakeModifier, hashStake
         height:             (int) block height
         fStakeDoubleSpent:  (bool) spend the coinstake input inside the block
         fZPoS:              (bool) stake the block with zerocoin
         spendingPrevOuts:   ({COutPoint --> (int, int, int, str)} dictionary)
                              map outpoints (to be used as tx inputs) to amount, block_time, nStakeModifier, hashStake
:return  block:              (CBlock) generated block
def create_spam_block(self, hashPrevBlock, stakingPrevOuts, height, fStakeDoubleSpent=False, fZPoS=False, spendingPrevOuts={}):
    ' creates a block to spam the network with\n        :param   hashPrevBlock:      (hex string) hash of previous block\n                 stakingPrevOuts:    ({COutPoint --> (int, int, int, str)} dictionary)\n                                      map outpoints (to be used as staking inputs) to amount, block_time, nStakeModifier, hashStake\n                 height:             (int) block height\n                 fStakeDoubleSpent:  (bool) spend the coinstake input inside the block\n                 fZPoS:              (bool) stake the block with zerocoin\n                 spendingPrevOuts:   ({COutPoint --> (int, int, int, str)} dictionary)\n                                      map outpoints (to be used as tx inputs) to amount, block_time, nStakeModifier, hashStake\n        :return  block:              (CBlock) generated block\n        '
    if (len(spendingPrevOuts) == 0):
        spendingPrevOuts = dict(stakingPrevOuts)
    current_time = int(time.time())
    nTime = (current_time & 4294967280)
    coinbase = create_coinbase(height)
    coinbase.vout[0].nValue = 0
    coinbase.vout[0].scriptPubKey = b
    coinbase.nTime = nTime
    coinbase.rehash()
    block = create_block(int(hashPrevBlock, 16), coinbase, nTime)
    if (not block.solve_stake(stakingPrevOuts)):
        raise Exception('Not able to solve for any prev_outpoint')
    signed_stake_tx = self.sign_stake_tx(block, stakingPrevOuts[block.prevoutStake][0], fZPoS)
    block.vtx.append(signed_stake_tx)
    if ((not fZPoS) and (not fStakeDoubleSpent)):
        del spendingPrevOuts[block.prevoutStake]
    if (len(spendingPrevOuts) > 0):
        del spendingPrevOuts[choice(list(spendingPrevOuts))]
    for outPoint in spendingPrevOuts:
        value_out = int((spendingPrevOuts[outPoint][0] - (self.DEFAULT_FEE * COIN)))
        tx = create_transaction(outPoint, b, value_out, nTime, scriptPubKey=CScript([self.block_sig_key.get_pubkey(), OP_CHECKSIG]))
        signed_tx_hex = self.node.signrawtransaction(bytes_to_hex_str(tx.serialize()))['hex']
        signed_tx = CTransaction()
        signed_tx.deserialize(BytesIO(hex_str_to_bytes(signed_tx_hex)))
        block.vtx.append(signed_tx)
    block.hashMerkleRoot = block.calc_merkle_root()
    block.rehash()
    block.sign_block(self.block_sig_key)
    return block