| 870 | } |
| 871 | |
| 872 | size_t bitcoin_tx_output_weight(size_t outscript_len) |
| 873 | { |
| 874 | size_t weight; |
| 875 | |
| 876 | /* amount, len, scriptpubkey */ |
| 877 | weight = (8 + varint_size(outscript_len) + outscript_len) * 4; |
| 878 | |
| 879 | if (chainparams->is_elements) { |
| 880 | /* Each output additionally has an asset_tag (1 + 32), value |
| 881 | * is prefixed by a version (1 byte), an empty nonce (1 |
| 882 | * byte), two empty proofs (2 bytes). */ |
| 883 | weight += (32 + 1 + 1 + 1) * 4; |
| 884 | } |
| 885 | |
| 886 | return weight; |
| 887 | } |
| 888 | |
| 889 | /* We grind signatures to get them down to 71 bytes */ |
| 890 | size_t bitcoin_tx_input_sig_weight(void) |
no test coverage detected