Package com.iconloop.score.test
Interface ServiceManager.Block
-
- Enclosing class:
- ServiceManager
public static interface ServiceManager.Block
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getHeight()
Get height of the blocklong
getTimestamp()
Get timestamp of the blockbyte[]
hashOfTransactionAt(int idx)
Calculate hash of transaction at the indexvoid
increase()
Increase last block height by one.void
increase(long count)
Increase last block height
-
-
-
Method Detail
-
getHeight
long getHeight()
Get height of the block- Returns:
- Height of the current block.
-
getTimestamp
long getTimestamp()
Get timestamp of the block- Returns:
- Timestamp of the block in micro-second
-
increase
void increase()
Increase last block height by one.To get updated block information, use
ServiceManager.getBlock()
.- See Also:
increase(long)
-
increase
void increase(long count)
Increase last block heightTo get updated block information, use
ServiceManager.getBlock()
.- Parameters:
count
- amount of height to increase- See Also:
increase()
,ServiceManager.getBlock()
-
hashOfTransactionAt
byte[] hashOfTransactionAt(int idx)
Calculate hash of transaction at the indexIt can be used to match transaction hash retrieved by
Context.getTransactionHash()
- Parameters:
idx
- Index of the transaction- Returns:
- the hash value used for the transaction
-
-