WireTransaction type mismatch in Corda.

0 votes

I am building a flow using Corda IRS.. The flow is M15 compatible but its working on M14 compatible.

The source code i found is like this:

override fun call(): TransactionSignature {
    val resp = sendAndReceive<TransactionSignature>(oracle, SignRequest(partialMerkleTx))
    return resp.unwrap { sig ->
        check(oracle.owningKey.isFulfilledBy(listOf(sig.by)))
        tx.toWireTransaction().checkSignature(sig)
        sig
    }
}


and the code i am using is:

override fun call(): TransactionSignature {
    val resp = sendAndReceive<TransactionSignature>(agency, SignRequest(partialMerkleTx))
    return resp.unwrap { sig ->
        check(agency.owningKey.isFulfilledBy( listOf(sig.by)))
        tx.toWireTransaction().checkSignature(sig)
        sig
    }
}

Expected: The IRS checkSignature should point to WireTransaction.checkSignature() that uses DigitalKey.WithKey

Problem: The IRS checkSignature is pointing to WireTransaction.kt implementation that uses TransactionSignature

How can i solve this?

Jul 11, 2018 in Blockchain by slayer
• 29,050 points
26 views

1 answer to this question.

0 votes
On M14. checkSignature should take a DigitalSignature.WithKey.. Maybe its using the M15 config.. Clear your local maven repository and also, caches if you're using IntelliJ. Then try running it.. To know more, go through https://www.jetbrains.com/help/idea/cleaning-system-cache.html
answered Jul 11, 2018 by digger
• 27,630 points

Related Questions In Blockchain

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

How do I change default service names in Corda Demobench?

Each Corda node individually advertises the services ...READ MORE

answered Aug 14, 2018 in Blockchain by Perry
• 17,010 points
82 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer