Document And/Or vectors contain 2 elements#602
Document And/Or vectors contain 2 elements#602sanket1729 merged 1 commit intorust-bitcoin:masterfrom
Conversation
It is not immediately obvious that the `Concrete::And` and `Or` vectors contain exactly 2 elements, add code comment to document it.
|
After #594 I might investigate whether it helps to remove the vectors all together. In |
|
@tcharding that's because |
|
Do you mean policies are a thing that is still being improved but miniscript itself is more 'complete'? |
|
Miniscript is actual on-chain data. Policies are part of the "policy compiler" which is an entirely offchain tool used to produce efficient Miniscripts, and which has no guarantees about determinism or anything. As far as I know it isn't specced out or anything. So in that sense, yes, Miniscript is more "complete". In another sense, that way more people care about Miniscirpt than care about this compiler thing, I expect more future work to go into Miniscript than the compiler. But that's just me :). |
|
We also care much less about memory efficiency for the compiler, for this reason, which is why we have |
|
Awesome, thanks man. |
…in 2 elements
47c87769d4a88005364b4ec7299ba6d9ef2f8252 Document And/Or vectors contain 2 elements (Tobin C. Harding)
Pull request description:
It is not immediately obvious that the `Concrete::And` and `Or` vectors contain exactly 2 elements, add code comment to document it.
ACKs for top commit:
apoelstra:
ACK 47c87769d4a88005364b4ec7299ba6d9ef2f8252
Tree-SHA512: 477c1a3b36a4c5632f35433cbcb4bcafb4d005acdff6a82785ee7c175aa243ce87439c8c6d71859face17035fc75ba232d2b42854edc7194b9b99134168dac34
It is not immediately obvious that the
Concrete::AndandOrvectors contain exactly 2 elements, add code comment to document it.