Class Bundler

java.lang.Object
nxt.blockchain.Bundler

public final class Bundler extends Object
  • Method Details

    • getBundler

      public static Bundler getBundler(ChildChain childChain, long accountId)
    • createBundlingFilter

      public static Bundler.Filter createBundlingFilter(String name, String parameter)
    • createBundlingRule

      public static Bundler.Rule createBundlingRule(long minRateNQTPerFXT, long overpayFQTPerFXT, String feeCalculatorName, List<Bundler.Filter> filters)
    • addOrChangeBundler

      public static Bundler addOrChangeBundler(ChildChain childChain, byte[] privateKey, long totalFeesLimitFQT, List<Bundler.Rule> bundlingRules)
    • addBundlingRule

      public static Bundler addBundlingRule(ChildChain childChain, byte[] privateKey, Bundler.Rule rule)
    • enrichChildBlockList

      public static long enrichChildBlockList(List<ChildTransaction> childTransactions, ChildChain childChain, int timestamp, short deadline, long totalFeesLimitFQT, List<Bundler.Rule> bundlingRules) throws NxtException.NotValidException
      Enrich a prospective child block list with child transactions according to the specified bundlingRules and the totalFeesLimitFQT .

      The totalFeesLimitFQT is internally adjusted by subtracting the minimum required fee for each transaction already present in the provided childTransactions list.

      Parameters:
      childTransactions - The list of child transactions that are currently planned for inclusion in the child block.
      childChain - The child chain from which transactions to be added to the list.
      timestamp - The timestamp of the prospective ChildBlock transaction
      deadline - The deadline of the prospective ChildBlock transaction
      totalFeesLimitFQT - Limit on the fee that the child block transactions can consume
      bundlingRules - Bundling rules for filtering or prioritizing the additional transactions
      Returns:
      The minimum fee the ChildBlock transaction must pay
      Throws:
      NxtException.NotValidException - If total fee is not enough to cover the minimum fee for the existing transactions
    • getAllBundlers

      public static List<Bundler> getAllBundlers()
    • getChildChainBundlers

      public static List<Bundler> getChildChainBundlers(ChildChain childChain)
    • getAccountBundlers

      public static List<Bundler> getAccountBundlers(long accountId)
    • getBundlerRates

      public static List<BundlerRate> getBundlerRates()
    • stopBundler

      public static Bundler stopBundler(ChildChain childChain, long accountId)
    • stopAccountBundlers

      public static void stopAccountBundlers(long accountId)
    • stopChildChainBundlers

      public static void stopChildChainBundlers(ChildChain childChain)
    • stopAllBundlers

      public static void stopAllBundlers()
    • getAvailableFilters

      public static Collection<Bundler.Filter> getAvailableFilters()
    • getAvailableFeeCalculators

      public static Collection<Bundler.FeeCalculator> getAvailableFeeCalculators()
    • init

      public static void init()
    • getChildChain

      public final ChildChain getChildChain()
    • getPublicKey

      public final byte[] getPublicKey()
    • getAccountId

      public final long getAccountId()
    • getTotalFeesLimitFQT

      public final long getTotalFeesLimitFQT()
    • getCurrentTotalFeesFQT

      public final long getCurrentTotalFeesFQT()
    • getConfirmedTotalFeesFQT

      public final long getConfirmedTotalFeesFQT()
    • getBundlingRules

      public List<Bundler.Rule> getBundlingRules()
    • getBundlerRate

      public final BundlerRate getBundlerRate()
      Returns:
      Minimum rate among unfiltered rules, null if all rules are filtered