def stake_next_block(self, node_id, stakeableUtxos, btime=None, privKeyWIF=None, vtx=[], fDoubleSpend=False):
    ' Calls stake_block appending to the current tip'
    assert_greater_than(len(self.nodes), node_id)
    saplingActive = (self.nodes[node_id].getblockchaininfo()['upgrades']['v5 shield']['status'] == 'active')
    blockVersion = (8 if saplingActive else 7)
    nHeight = self.nodes[node_id].getblockcount()
    prevHhash = self.nodes[node_id].getblockhash(nHeight)
    prevBlock = self.nodes[node_id].getblock(prevHhash, True)
    prevModifier = prevBlock['stakeModifier']
    saplingRoot = prevBlock['finalsaplingroot']
    return self.stake_block(node_id, blockVersion, (nHeight + 1), prevHhash, prevModifier, saplingRoot, stakeableUtxos, btime, privKeyWIF, vtx, fDoubleSpend)
Calls stake_block appending to the current tip
def stake_next_block(self, node_id, stakeableUtxos, btime=None, privKeyWIF=None, vtx=[], fDoubleSpend=False):
    ' '
    assert_greater_than(len(self.nodes), node_id)
    saplingActive = (self.nodes[node_id].getblockchaininfo()['upgrades']['v5 shield']['status'] == 'active')
    blockVersion = (8 if saplingActive else 7)
    nHeight = self.nodes[node_id].getblockcount()
    prevHhash = self.nodes[node_id].getblockhash(nHeight)
    prevBlock = self.nodes[node_id].getblock(prevHhash, True)
    prevModifier = prevBlock['stakeModifier']
    saplingRoot = prevBlock['finalsaplingroot']
    return self.stake_block(node_id, blockVersion, (nHeight + 1), prevHhash, prevModifier, saplingRoot, stakeableUtxos, btime, privKeyWIF, vtx, fDoubleSpend)