mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
[CORDA-1472]: Crackdown on warnings. (#3136)
This commit is contained in:
committed by
GitHub
parent
5a92079011
commit
d027b5b8f2
@ -17,7 +17,6 @@ import net.corda.testing.driver.InProcess
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.node.User
|
||||
import net.corda.testing.node.internal.poll
|
||||
import net.corda.traderdemo.flow.BuyerFlow
|
||||
import net.corda.traderdemo.flow.CommercialPaperIssueFlow
|
||||
import net.corda.traderdemo.flow.SellerFlow
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
|
@ -26,8 +26,8 @@ private class TraderDemo {
|
||||
private val logger = contextLogger()
|
||||
val buyerName = DUMMY_BANK_A_NAME
|
||||
val sellerName = DUMMY_BANK_B_NAME
|
||||
val sellerRpcPort = 10009
|
||||
val bankRpcPort = 10012
|
||||
const val sellerRpcPort = 10009
|
||||
const val bankRpcPort = 10012
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
|
@ -62,7 +62,7 @@ class TransactionGraphSearch(private val transactions: TransactionStorage,
|
||||
results += tx
|
||||
|
||||
val inputsLeadingToUnvisitedTx: Iterable<StateRef> = tx.inputs.filter { it.txhash !in alreadyVisited }
|
||||
val unvisitedInputTxs: Map<SecureHash, SignedTransaction> = inputsLeadingToUnvisitedTx.map { it.txhash }.toHashSet().map { transactions.getTransaction(it) }.filterNotNull().associateBy { it.id }
|
||||
val unvisitedInputTxs: Map<SecureHash, SignedTransaction> = inputsLeadingToUnvisitedTx.map { it.txhash }.toHashSet().mapNotNull { transactions.getTransaction(it) }.associateBy { it.id }
|
||||
val unvisitedInputTxsWithInputIndex: Iterable<Pair<SignedTransaction, Int>> = inputsLeadingToUnvisitedTx.filter { it.txhash in unvisitedInputTxs.keys }.map { Pair(unvisitedInputTxs[it.txhash]!!, it.index) }
|
||||
next += (unvisitedInputTxsWithInputIndex.filter { (stx, idx) ->
|
||||
query.followInputsOfType == null || stx.tx.outputs[idx].data.javaClass == query.followInputsOfType
|
||||
|
@ -60,13 +60,12 @@ class CommercialPaperIssueFlow(private val amount: Amount<Currency>,
|
||||
}
|
||||
|
||||
// Now make a dummy transaction that moves it to a new key, just to show that resolving dependencies works.
|
||||
val move: SignedTransaction = run {
|
||||
|
||||
return run {
|
||||
val builder = TransactionBuilder(notary)
|
||||
CommercialPaper().generateMove(builder, issuance.tx.outRef(0), recipient)
|
||||
val stx = serviceHub.signInitialTransaction(builder)
|
||||
subFlow(FinalityFlow(stx))
|
||||
}
|
||||
|
||||
return move
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user