| 827 | } |
| 828 | |
| 829 | size_t bitcoin_tx_output_weight(size_t outscript_len) |
| 830 | { |
| 831 | size_t weight; |
| 832 | |
| 833 | /* amount, len, scriptpubkey */ |
| 834 | weight = (8 + varint_size(outscript_len) + outscript_len) * 4; |
| 835 | |
| 836 | if (chainparams->is_elements) { |
| 837 | /* Each output additionally has an asset_tag (1 + 32), value |
| 838 | * is prefixed by a version (1 byte), an empty nonce (1 |
| 839 | * byte), two empty proofs (2 bytes). */ |
| 840 | weight += (32 + 1 + 1 + 1) * 4; |
| 841 | } |
| 842 | |
| 843 | return weight; |
| 844 | } |
| 845 | |
| 846 | /* We grind signatures to get them down to 71 bytes */ |
| 847 | size_t bitcoin_tx_input_sig_weight(void) |
no test coverage detected