Minor: move some test functions for making zips out of the global namespace.

This commit is contained in:
Mike Hearn
2017-07-12 10:37:36 +02:00
committed by Andrius Dagys
parent 6ba3ae870c
commit 2cbdb719c6
3 changed files with 33 additions and 30 deletions

View File

@ -3,6 +3,8 @@ package net.corda.attachmentdemo
import co.paralleluniverse.fibers.Suspendable
import joptsimple.OptionParser
import net.corda.client.rpc.CordaRPCClient
import net.corda.core.InputStreamAndHash
import net.corda.core.InputStreamAndHash.Companion.createInMemoryTestZip
import net.corda.core.contracts.Contract
import net.corda.core.contracts.ContractState
import net.corda.core.contracts.TransactionForContract
@ -16,7 +18,6 @@ import net.corda.core.identity.AbstractParty
import net.corda.core.identity.Party
import net.corda.core.messaging.CordaRPCOps
import net.corda.core.messaging.startTrackedFlow
import net.corda.core.sizedInputStreamAndHash
import net.corda.core.transactions.SignedTransaction
import net.corda.core.utilities.Emoji
import net.corda.core.utilities.NetworkHostAndPort
@ -72,7 +73,7 @@ fun main(args: Array<String>) {
/** An in memory test zip attachment of at least numOfClearBytes size, will be used. */
fun sender(rpc: CordaRPCOps, numOfClearBytes: Int = 1024) { // default size 1K.
val (inputStream, hash) = sizedInputStreamAndHash(numOfClearBytes)
val (inputStream, hash) = InputStreamAndHash.createInMemoryTestZip(numOfClearBytes, 0)
sender(rpc, inputStream, hash)
}