Created
January 8, 2019 04:40
-
-
Save amolpednekar/bc9cf47fa9ef9ed2deaf4c9f18a4dca8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Initiate the upgrade of all the State instances using OldContract. | |
partyAProxy.vaultQuery(OldState::class.java).states | |
.filter { stateAndRef -> | |
stateAndRef.state.contract.equals(OldContract.id) | |
} | |
.forEach { stateAndRef -> | |
partyAProxy.startFlowDynamic( | |
ContractUpgradeFlow.Initiate::class.java, | |
stateAndRef, | |
NewContractAndState::class.java) | |
} | |
// Give the node the time to run the contract upgrade flows. | |
Thread.sleep(10000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment