You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We test multisig in a few forms, but we should support size estimation of any of the following:
p2wpkh, and P2SH(p2wpkh)
multisig, and P2SH(multisig), and P2WSH(multisig), and P2SH(P2WSH(multisig))
p2pk, and P2SH(p2pk), and P2WSH(p2pk), and P2SH(P2WSH(p2pk))
p2pkh, and P2SH(p2pkh), and P2WSH(p2pkh), and P2SH(P2WSH(p2pkh))
The test cases are organized into stack tests, which only need to know the p2pkh, p2pk, or multisig part (no p2sh or p2wsh knowledge is required for these)
The next part is testing every possible representation of the three basic supported types. This means testing it by itself, as P2SH, along with P2WSH & and P2SH(P2WSH()) if it's allowed (P2WPKH can't be wrapped in P2WSH). This tests the estimation of the full scriptSig and witness.
We test multisig in a few forms, but we should support size estimation of any of the following:
p2wpkh
, andP2SH(p2wpkh)
multisig
, andP2SH(multisig)
, andP2WSH(multisig)
, andP2SH(P2WSH(multisig))
p2pk
, andP2SH(p2pk)
, andP2WSH(p2pk)
, andP2SH(P2WSH(p2pk))
p2pkh
, andP2SH(p2pkh)
, andP2WSH(p2pkh)
, andP2SH(P2WSH(p2pkh))
The test cases are organized into stack tests, which only need to know the p2pkh, p2pk, or multisig part (no p2sh or p2wsh knowledge is required for these)
blocktrail-sdk-nodejs/test/size_estimation.test.js
Line 40 in 3347f94
The next part is testing every possible representation of the three basic supported types. This means testing it by itself, as P2SH, along with P2WSH & and P2SH(P2WSH()) if it's allowed (P2WPKH can't be wrapped in P2WSH). This tests the estimation of the full scriptSig and witness.
blocktrail-sdk-nodejs/test/size_estimation.test.js
Line 40 in 3347f94
Not the best illustrative example, but finally there are tests of estimating the size of a utxo object.
blocktrail-sdk-nodejs/test/size_estimation.test.js
Line 237 in 3347f94
The last two could probably be unified a bit, but though for now it shows what we need :)
The text was updated successfully, but these errors were encountered: