Good morning, for the previous few months I’ve been utilizing the next formulation to calculate transaction price based mostly on the transaction measurement when sending BTC from one tackle to a number of addresses(or batch transaction).
At the moment I wish to reverse this and accumulate my BTC from a number of completely different addresses and ship it to my chilly pockets(which is one tackle that can purposely accumulate BTC). So as a substitute of sending from 1 to many I wish to ship BTC from many to 1.
var transactionSizeBytes = _regularInputBytes + (countOfOutputsForThisTransactionWithoutChange * _regularOutputBytes) + (_regularOutputBytes/* bytes for change output*/) + _regularOverheadBytes;
logger.LogInformation($"Transaction measurement is : {transactionSizeBytes} bytes");
logger.LogInformation($"Transaction pace {_satoshiPerByteMedium} satoshi per byte ");
var transactionFeeSatoshi = transactionSizeBytes * _satoshiPerByteMedium;
var transactionFeeBtc = transactionFeeSatoshi * _satoshiInBtc;
return transactionFeeBtc;
That is the best way I’m calculating my price and transaction measurement for the batch transaction 1 to many. I’m assuming that if I wish to as a substitute ship BTC from many to 1 the formulation can be modified to:
var transactionSizeBytes = (countOfInputsForThisTransactionWithoutChange * _regularInputBytes) + (_regularOutputBytes/* just one output for assortment*/) + _regularOverheadBytes;
the place countOfInputsForThisTransactionWithoutChange can be just about the rely of addresses I would like BTC to gather from.
Please appropriate me if that is unsuitable.
