-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional payments integration tests #1135
Conversation
test/integration/payments.js
Outdated
}) | ||
}) | ||
|
||
it.only('can (wrapped in P2WSH) broadcast as an output, and be spent as an input', (done) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something blows up on P2WSH(P2WPKH)
... is that a problematic combo?
test/integration/payments.js
Outdated
}) | ||
|
||
it('can (wrapped in P2WSH) broadcast as an output, and be spent as an input', (done) => { | ||
if (k === 'p2wpkh') return done() // skip P2WSH(P2WPKH) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is P2WSH(P2WPKH)
possible?
Are we simply lacking support? (it fails)
test/integration/payments.js
Outdated
}) | ||
|
||
it('can (wrapped in P2WSH, then wrapped in P2SH) broadcast as an output, and be spent as an input', (done) => { | ||
if (k === 'p2wpkh') return done() // skip P2SH(P2WSH(P2WPKH)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, is P2SH(P2WSH(P2WPKH))
possible?
Are we simply lacking support? (it fails)
I'm happy to release after this passes |
test/integration/payments.js
Outdated
const p2wsh = bitcoin.payments.p2wsh({ redeem: { output }, network: NETWORK }) | ||
const p2sh = bitcoin.payments.p2sh({ redeem: { output: p2wsh.output }, network: NETWORK }) | ||
|
||
buildAndSign(depends, p2sh.output, p2sh.redeem.output, p2wsh.redeem.output, done) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that this works so simply... is awesome
Waiting to see if |
src/transaction_builder.js
Outdated
let signScript = witnessScript | ||
if (expanded.type === SCRIPT_TYPES.P2WPKH) { | ||
signScript = payments.p2pkh({ pubkey: expanded.pubkeys[0] }).output | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this would resolve the signing issues for P2WSH(P2WPKH)
... but, it still fails. Investigating.
ok, @sipa has mentioned that |
Any thoughts about whether we should try and block it via the payments scripts? |
No description provided.