mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 01:56:44 +00:00
add fee rate retreival to blocktransaction
This commit is contained in:
parent
f10688279a
commit
b4b2534e7a
1 changed files with 9 additions and 0 deletions
|
@ -53,6 +53,15 @@ public class BlockTransaction extends BlockTransactionHash implements Comparable
|
||||||
return Collections.unmodifiableSet(funding);
|
return Collections.unmodifiableSet(funding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Double getFeeRate() {
|
||||||
|
if(getFee() != null && transaction != null) {
|
||||||
|
double vSize = transaction.getVirtualSize();
|
||||||
|
return getFee() / vSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compareTo(BlockTransaction blkTx) {
|
public int compareTo(BlockTransaction blkTx) {
|
||||||
int blockOrder = compareBlockOrder(blkTx);
|
int blockOrder = compareBlockOrder(blkTx);
|
||||||
|
|
Loading…
Reference in a new issue