def __init__(self, p2pheaders_and_shortids=None):
    self.header = CBlockHeader()
    self.nonce = 0
    self.shortids = []
    self.prefilled_txn = []
    self.use_witness = False
    if (p2pheaders_and_shortids is not None):
        self.header = p2pheaders_and_shortids.header
        self.nonce = p2pheaders_and_shortids.nonce
        self.shortids = p2pheaders_and_shortids.shortids
        last_index = (- 1)
        for x in p2pheaders_and_shortids.prefilled_txn:
            self.prefilled_txn.append(PrefilledTransaction(((x.index + last_index) + 1), x.tx))
            last_index = self.prefilled_txn[(- 1)].index
def __init__(self, p2pheaders_and_shortids=None):
    self.header = CBlockHeader()
    self.nonce = 0
    self.shortids = []
    self.prefilled_txn = []
    self.use_witness = False
    if (p2pheaders_and_shortids is not None):
        self.header = p2pheaders_and_shortids.header
        self.nonce = p2pheaders_and_shortids.nonce
        self.shortids = p2pheaders_and_shortids.shortids
        last_index = (- 1)
        for x in p2pheaders_and_shortids.prefilled_txn:
            self.prefilled_txn.append(PrefilledTransaction(((x.index + last_index) + 1), x.tx))
            last_index = self.prefilled_txn[(- 1)].index