Skip to content
Snippets Groups Projects
Commit abc7b92d authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Crosschain test had wrong recipient

parent c215c165
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ describe("Crosschain transactions", function() { ...@@ -127,7 +127,7 @@ describe("Crosschain transactions", function() {
// 3. tic generates a transaction based on H(X) given by toc (through internet) // 3. tic generates a transaction based on H(X) given by toc (through internet)
let mtx3 = yield ticM.prepareUTX(mtx0, ['SIG(0)'], [{ qty: 120, base: 0, lock: '(XHX(8AFC8DF633FC158F9DB4864ABED696C1AA0FE5D617A7B5F7AB8DE7CA2EFCD4CB) && SIG(' + tocM.pub + ')) || (SIG(' + ticM.pub + ') && SIG(' + tocM.pub + '))' }], { comment: 'META tic to toc', blockstamp: blockstampM }); let mtx3 = yield ticM.prepareUTX(mtx0, ['SIG(0)'], [{ qty: 120, base: 0, lock: '(XHX(8AFC8DF633FC158F9DB4864ABED696C1AA0FE5D617A7B5F7AB8DE7CA2EFCD4CB) && SIG(' + tocM.pub + ')) || (SIG(' + ticM.pub + ') && SIG(' + tocM.pub + '))' }], { comment: 'META tic to toc', blockstamp: blockstampM });
// 4. tic makes a rollback transaction from tx1, signed by both parties: toc and tic // 4. tic makes a rollback transaction from tx1, signed by both parties: toc and tic
let mtx4 = yield ticM.prepareMTX(mtx3, tocM, ['XHX(0) SIG(1) SIG(0) SIG(1)'], [{ qty: 120, base: 0, lock: 'SIG(' + tocB.pub + ')' }], { comment: 'money back to tocB', locktime: 3600*24, blockstamp: blockstampM }); // N.B.: locktime should be like 24h in real world let mtx4 = yield ticM.prepareMTX(mtx3, tocM, ['XHX(0) SIG(1) SIG(0) SIG(1)'], [{ qty: 120, base: 0, lock: 'SIG(' + ticM.pub + ')' }], { comment: 'money back to ticM', locktime: 3600*24, blockstamp: blockstampM }); // N.B.: locktime should be like 24h in real world
// We submit TX1 to the network & write it // We submit TX1 to the network & write it
yield tocB.sendTX(btx1); yield tocB.sendTX(btx1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment