Transfering btc from a number of btc addresses to a single btc tackle, estimating transaction measurement

on

|

views

and

comments


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.

Share this
Tags

Must-read

Waymo raises $16bn to gas international robotaxi enlargement | Know-how

Self-driving automobile firm Waymo on Monday stated it raised $16bn in a funding spherical that valued the Alphabet subsidiary at $126bn.Waymo co-chief executives...

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here