Package zephyr.daemon.model
Class ZephyrBlockHeader
java.lang.Object
zephyr.daemon.model.ZephyrBlockHeader
- Direct Known Subclasses:
ZephyrBlock
Models a Zephyr block header which contains information about the block.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns a deep copy of this header (the pricing record is copied as well).booleangetDepth()getHash()Return the block's height which is the total number of blocks that have occurred before.getNonce()Return the oracle pricing record this block was built with.getSize()inthashCode()merge(ZephyrBlockHeader header) setCumulativeDifficulty(BigInteger cumulativeDifficulty) setDifficulty(BigInteger difficulty) Set the block's height which is the total number of blocks that have occurred before.setLongTermWeight(Long longTermWeight) setMajorVersion(Integer majorVersion) setMinerTxHash(String minerTxHash) setMinorVersion(Integer minorVersion) setOrphanStatus(Boolean orphanStatus) setPowHash(String powHash) setPrevHash(String prevHash) setPricingRecord(ZephyrPricingRecord pricingRecord) Set the oracle pricing record this block was built with.setReward(BigInteger reward) setTimestamp(Long timestamp) toString()toString(int indent)
-
Constructor Details
-
ZephyrBlockHeader
public ZephyrBlockHeader() -
ZephyrBlockHeader
-
-
Method Details
-
copy
Returns a deep copy of this header (the pricing record is copied as well).- Returns:
- the copy
-
getHash
-
setHash
-
getHeight
Return the block's height which is the total number of blocks that have occurred before.- Returns:
- the block's height
-
setHeight
Set the block's height which is the total number of blocks that have occurred before.- Parameters:
height- is the block's height to set- Returns:
- a reference to this header for chaining
-
getTimestamp
-
setTimestamp
-
getSize
-
setSize
-
getWeight
-
setWeight
-
getLongTermWeight
-
setLongTermWeight
-
getDepth
-
setDepth
-
getDifficulty
-
setDifficulty
-
getCumulativeDifficulty
-
setCumulativeDifficulty
-
getMajorVersion
-
setMajorVersion
-
getMinorVersion
-
setMinorVersion
-
getNonce
-
setNonce
-
getMinerTxHash
-
setMinerTxHash
-
getNumTxs
-
setNumTxs
-
getOrphanStatus
-
setOrphanStatus
-
getPrevHash
-
setPrevHash
-
getReward
-
setReward
-
getPowHash
-
setPowHash
-
getPricingRecord
Return the oracle pricing record this block was built with.- Returns:
- the block's pricing record
-
setPricingRecord
Set the oracle pricing record this block was built with.- Parameters:
pricingRecord- is the block's pricing record to set- Returns:
- a reference to this header for chaining
-
merge
-
toString
-
toString
-
hashCode
public int hashCode() -
equals
-