X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FFeeEstimator.java;h=1dea94b1dd4c4889dd87a367769029fca93949ad;hb=af6f9949b19c1e8d2daac5c7a94cf14d41175f2b;hp=675ae698f5a8ac45f16a0b280a437b95d9972aac;hpb=1854b5cebef22ace9e9e4dd191f609818df9ce08;p=ldk-java diff --git a/src/main/java/org/ldk/structs/FeeEstimator.java b/src/main/java/org/ldk/structs/FeeEstimator.java index 675ae698..1dea94b1 100644 --- a/src/main/java/org/ldk/structs/FeeEstimator.java +++ b/src/main/java/org/ldk/structs/FeeEstimator.java @@ -32,12 +32,12 @@ public class FeeEstimator extends CommonBase { /** * Gets estimated satoshis of fee required per 1000 Weight-Units. * - * Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later - * round-downs don't put us below 1 satoshi-per-byte). + * LDK will wrap this method and ensure that the value returned is no smaller than 253 + * (ie 1 satoshi-per-byte rounded up to ensure later round-downs don't put us below 1 satoshi-per-byte). * - * This method can be implemented with the following unit conversions: - * max(satoshis-per-byte * 250, 253) - * max(satoshis-per-kbyte / 4, 253) + * The following unit conversions can be used to convert to sats/KW: + * satoshis-per-byte * 250 + * satoshis-per-kbyte / 4 */ int get_est_sat_per_1000_weight(ConfirmationTarget confirmation_target); } @@ -47,6 +47,7 @@ public class FeeEstimator extends CommonBase { impl_holder.held = new FeeEstimator(new bindings.LDKFeeEstimator() { @Override public int get_est_sat_per_1000_weight(ConfirmationTarget confirmation_target) { int ret = arg.get_est_sat_per_1000_weight(confirmation_target); + Reference.reachabilityFence(arg); return ret; } }); @@ -55,12 +56,12 @@ public class FeeEstimator extends CommonBase { /** * Gets estimated satoshis of fee required per 1000 Weight-Units. * - * Must return a value no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later - * round-downs don't put us below 1 satoshi-per-byte). + * LDK will wrap this method and ensure that the value returned is no smaller than 253 + * (ie 1 satoshi-per-byte rounded up to ensure later round-downs don't put us below 1 satoshi-per-byte). * - * This method can be implemented with the following unit conversions: - * max(satoshis-per-byte * 250, 253) - * max(satoshis-per-kbyte / 4, 253) + * The following unit conversions can be used to convert to sats/KW: + * satoshis-per-byte * 250 + * satoshis-per-kbyte / 4 */ public int get_est_sat_per_1000_weight(org.ldk.enums.ConfirmationTarget confirmation_target) { int ret = bindings.FeeEstimator_get_est_sat_per_1000_weight(this.ptr, confirmation_target);