Пример #1
0
	def toString(self):
		"""Human readable print."""
		print "@@@@@@@@@@@@@@@@@@@@@@@ INPUT @@@@@@@@@@@@@@@@@@@@@@@@@@@"
		print "Transaction Hash: " + binaryRead.strToHex(self.transactionHash)
		print "Transaction Index: " + binaryRead.uIntToStr(self.transactionIndex)
		print "Varint: " + ''.join(str(self.varInt).encode('hex'))
		print "Script Length: " + str(self.scriptLength)
		print "Script Data Encoded: " + binaryRead.strToHex(self.scriptData)
		print "Script Data Decoded: " + self.scriptData
		print "Coinbase: " + str(self.isCoinbase)
		print "Sequence Number: " + binaryRead.uIntToStr(self.sequenceNumber)
		print "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
Пример #2
0
	def toString(self):
		"""Human readable print."""
		print "###################BLOCK HEADER ###################"
		print "Magic ID: " + binaryRead.strToHex(self.magicID)
		print "Bloc Length: " + binaryRead.uIntToStr(self.length) + " bytes"
		print "Version: " + binaryRead.uIntToStr(self.version)
		print "Previous Block Hash: " + binaryRead.strToHex(self.previousBlockHash)
		print "Merkle Root: " + binaryRead.strToHex(self.merkleRoot)
		print "Time Stamp: " + binaryRead.binaryToTime(self.timestamp)
		print "Target Difficulty: " + binaryRead.strToHex(self.targetDifficulty)
		print "Nonce: " + binaryRead.uIntToStr(self.nonce)
		print "Block Hash: " + self.blockHash
		print "###################################################"
Пример #3
0
 def toString(self):
     """Human readable print."""
     print "@@@@@@@@@@@@@@@@@@@@@@@ INPUT @@@@@@@@@@@@@@@@@@@@@@@@@@@"
     print "Transaction Hash: " + binaryRead.strToHex(self.transactionHash)
     print "Transaction Index: " + binaryRead.uIntToStr(
         self.transactionIndex)
     print "Varint: " + ''.join(str(self.varInt).encode('hex'))
     print "Script Length: " + str(self.scriptLength)
     print "Script Data Encoded: " + binaryRead.strToHex(self.scriptData)
     print "Script Data Decoded: " + self.scriptData
     print "Coinbase: " + str(self.isCoinbase)
     print "Sequence Number: " + binaryRead.uIntToStr(self.sequenceNumber)
     print "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
Пример #4
0
 def toString(self):
     """Human readable print."""
     print "###################BLOCK HEADER ###################"
     print "Magic ID: " + binaryRead.strToHex(self.magicID)
     print "Bloc Length: " + binaryRead.uIntToStr(self.length) + " bytes"
     print "Version: " + binaryRead.uIntToStr(self.version)
     print "Previous Block Hash: " + binaryRead.strToHex(self.previousBlockHash)
     print "Merkle Root: " + binaryRead.strToHex(self.merkleRoot)
     print "Time Stamp: " + binaryRead.binaryToTime(self.timestamp)
     print "Target Difficulty: " + binaryRead.strToHex(self.targetDifficulty)
     print "Nonce: " + binaryRead.uIntToStr(self.nonce)
     print "Block Hash: " + self.blockHash
     print "###################################################"
Пример #5
0
	def toString(self):
		"""Humand readable print."""
		print "----------------------- TRANSACTION----------------------------"
		print "Transaction Version: " + binaryRead.uIntToStr(self.transactionVersion)
		print "Input Varint: " +  ''.join(str(self.inputVarInt).encode('hex'))
		print "Input Count: " + str(self.inputCount)
		for i in self.inputList:
			print i.toString()
		print "Output Varint: " +  ''.join(str(self.outputVarInt).encode('hex'))
		print "Output Count: " + str(self.outputCount)
		for i in self.outputList:
			print i.toString()
		print "Transaction LockTime: " + binaryRead.uIntToStr(self.lockTime)
		print "---------------------------------------------------------------"
Пример #6
0
	def setCoinbase(self, transactionHash):
		"""Sets coinbase state."""
		coinbaseCode = binaryRead.uIntToStr(transactionHash)
		if (coinbaseCode == '4294967295'):
			self.isCoinbase = True
		else:
			self.isCoinbase = False
Пример #7
0
 def setCoinbase(self, transactionHash):
     """Sets coinbase state."""
     coinbaseCode = binaryRead.uIntToStr(transactionHash)
     if (coinbaseCode == '4294967295'):
         self.isCoinbase = True
     else:
         self.isCoinbase = False