-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AKI-449: BlockchainTestUtils functionality to generate random Unity chains #1031
Conversation
public static void generateRandomUnityChain( | ||
StandaloneBlockchain chain, | ||
TestResourceProvider resourceProvider, | ||
int blocks, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long
// get the parent seed | ||
byte[] parentSeed = chain.forkUtility.isUnityForkBlock(parent.getNumber()) | ||
? chain.getGenesis().getGenesisStakingBlock().getSeed() | ||
: chain.getBestStakingBlock().getSeed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add todo for sidechains
* @param accounts existing accounts | ||
* @param txCount maximum number of transactions per block | ||
*/ | ||
public static void generateRandomUnityChain( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add java doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print seed at start
|
||
private static final BigInteger MIN_SELF_STAKE = new BigInteger("1000000000000000000000"); | ||
|
||
private static Pair<Block, ImportResult> addMiningBlock( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check with pre unity
- number of blocks given as long; - printing seed used at the start of the random chain generation; - creating chains with blocks without transactions is limited to pre-unity blocks since accounts are required for deploying the staking contract;
4c3ba0c
to
258bcd4
Compare
Description
Type of change
Testing