Package org.consensusj.bitcoin.json.pojo
Class ChainTip
java.lang.Object
org.consensusj.bitcoin.json.pojo.ChainTip
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindActiveChainTip
(List<ChainTip> chainTips) Find the active chain tip if there is onestatic ChainTip
findActiveChainTipOrElseThrow
(List<ChainTip> chainTips) int
org.bitcoinj.base.Sha256Hash
getHash()
int
static ChainTip
ofActive
(int height, org.bitcoinj.base.Sha256Hash hash) Construct an "active"ChainTip
-
Constructor Details
-
ChainTip
-
-
Method Details
-
getHeight
-
getHash
-
getBranchlen
-
getStatus
-
findActiveChainTip
Find the active chain tip if there is one- Parameters:
chainTips
- the list to search- Returns:
- non-empty optional if active is found, empty optional if not found
-
findActiveChainTipOrElseThrow
-
ofActive
Construct an "active"ChainTip
- Parameters:
height
- best block heighthash
- best block hash- Returns:
- current "active" ChainTip
-