Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private fun getSignedNetworkParameters(): NetworkParameters {
- //load the notary from a Keystore. This avoids having to start a flow from a node in order to retrieve NotaryInfo
- val notary = loadKeyStore("\path-to-keystore\keystore.jks", "keystore-password")
- val certificateAndKeyPair : CertificateAndKeyPair = notary.getCertificateAndKeyPair("entry-alias", "entry-password")
- val notaryParty = Party(certificateAndKeyPair.certificate)
- val notaryInfo = listOf(NotaryInfo(notaryParty, false))
- //map contract ID to the SHA-256 hash of its CorDapp contracts&states JAR file
- val whitelistedContractImplementations = mapOf(
- TestContract.TEST_CONTRACT_ID to listOf(getCheckSum(contractFile))
- )
- return NetworkParameters(minimumPlatformVersion = 3, notaries = notaryInfo,
- maxMessageSize = n, maxTransactionSize = n, modifiedTime = Instant.now(),
- epoch = 1, whitelistedContractImplementations = whitelistedContractImplementations)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement