Class FeeFilterMessage

  • All Implemented Interfaces:
    Message

    public class FeeFilterMessage
    extends BaseMessage
    Represents a "feefilter" message on the P2P network, which instructs a peer to filter transaction invs for transactions that fall below the feerate provided.

    See BIP133 for details.

    Instances of this class are immutable.

    • Method Detail

      • of

        public static FeeFilterMessage of​(Coin feeRate)
        Create a fee filter message with a given fee rate.
        Parameters:
        feeRate - fee rate
        Returns:
        fee filter message
      • read

        public static FeeFilterMessage read​(java.nio.ByteBuffer payload)
                                     throws java.nio.BufferUnderflowException,
                                            ProtocolException
        Deserialize this message from a given payload.
        Parameters:
        payload - payload to deserialize from
        Returns:
        read message
        Throws:
        java.nio.BufferUnderflowException - if the read message extends beyond the remaining bytes of the payload
        ProtocolException
      • bitcoinSerializeToStream

        protected void bitcoinSerializeToStream​(java.io.OutputStream stream)
                                         throws java.io.IOException
        Description copied from class: BaseMessage
        Serializes this message to the provided stream. If you just want the raw bytes use BaseMessage.serialize().
        Specified by:
        bitcoinSerializeToStream in class BaseMessage
        Throws:
        java.io.IOException
      • feeRate

        public Coin feeRate()
        Gets the fee rate.
        Returns:
        fee rate
      • getFeeRate

        @Deprecated
        public Coin getFeeRate()
        Deprecated.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object