本文整理汇总了Python中armoryengine.BinaryPacker.BinaryPacker.getBinaryString方法的典型用法代码示例。如果您正苦于以下问题:Python BinaryPacker.getBinaryString方法的具体用法?Python BinaryPacker.getBinaryString怎么用?Python BinaryPacker.getBinaryString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类armoryengine.BinaryPacker.BinaryPacker
的用法示例。
在下文中一共展示了BinaryPacker.getBinaryString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: serialize
# 需要导入模块: from armoryengine.BinaryPacker import BinaryPacker [as 别名]
# 或者: from armoryengine.BinaryPacker.BinaryPacker import getBinaryString [as 别名]
def serialize(self):
bp = BinaryPacker()
bp.put(BINARY_CHUNK, self.header.serialize())
bp.put(VAR_INT, len(self.txList))
for tx in self.txList:
bp.put(BINARY_CHUNK, tx.serialize())
return bp.getBinaryString()
示例2: serialize
# 需要导入模块: from armoryengine.BinaryPacker import BinaryPacker [as 别名]
# 或者: from armoryengine.BinaryPacker.BinaryPacker import getBinaryString [as 别名]
def serialize(self):
if self.numTx == UNINITIALIZED:
raise UnitializedBlockDataError, 'PyBlockData object not initialized!'
binOut = BinaryPacker()
binOut.put(VAR_INT, self.numTx)
for tx in self.txList:
binOut.put(BINARY_CHUNK, tx.serialize())
return binOut.getBinaryString()
示例3: serialize
# 需要导入模块: from armoryengine.BinaryPacker import BinaryPacker [as 别名]
# 或者: from armoryengine.BinaryPacker.BinaryPacker import getBinaryString [as 别名]
def serialize(self):
bp = BinaryPacker()
return bp.getBinaryString()