def getBlock(self, n): """Get a specific block from the blockchain and filter the data.""" data = self._rpcRequest("eth_getBlockByNumber", [n, True], "result") block = crawler_util.decodeBlock(data) uncleHash = data["hash"] if data["uncles"]: uncles = self.retrieveUncles(uncleHash, block["number"]) block["uncles"] = uncles return block
def getBlock(self, n): """Get a specific block from the blockchain and filter the data.""" data = self._rpcRequest("eth_getBlockByNumber", [hex(n), True], "result") block = crawler_util.decodeBlock(data) return block