Merge pull request #37 from salvium/tx-size-calc-fix
Carrot TX size calculation fixes
This commit is contained in:
@@ -92,19 +92,26 @@ static size_t estimate_rct_tx_size_carrot(int n_inputs, int mixin, int n_outputs
|
|||||||
size += 1 + 6;
|
size += 1 + 6;
|
||||||
|
|
||||||
// vin
|
// vin
|
||||||
size += n_inputs * (1+6+4+(mixin+1)*2+32);
|
size += n_inputs * (1+1+4+(mixin+1)*2+32);
|
||||||
|
|
||||||
// vout
|
// vout
|
||||||
size += n_outputs * (3+4+16+32);
|
size += n_outputs * (1+1+32+4+3+16);
|
||||||
|
|
||||||
// extra
|
// extra
|
||||||
size += extra_size;
|
size += extra_size;
|
||||||
|
|
||||||
// rct signatures
|
|
||||||
|
|
||||||
// type
|
// type
|
||||||
size += 1;
|
size += 1;
|
||||||
|
|
||||||
|
// amount_burnt
|
||||||
|
size += 8;
|
||||||
|
|
||||||
|
// return_address data
|
||||||
|
// NOTE: this will be wrong by 21 bytes for STAKE TXs using `protocol_tx_data_t`
|
||||||
|
size += n_outputs * (32 + 1);
|
||||||
|
|
||||||
|
// rct signatures
|
||||||
|
|
||||||
// rangeSigs
|
// rangeSigs
|
||||||
if (bulletproof || bulletproof_plus)
|
if (bulletproof || bulletproof_plus)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user