Documentation
¶
Index ¶
- Constants
- func UseLogger(logger *logger.Logger)
- type PolicyService
- func (ps *PolicyService) GetBlocksizeSoftLimit(p peer.ID) (uint32, error)
- func (ps *PolicyService) GetFeePerKb(p peer.ID) (types.Amount, error)
- func (ps *PolicyService) GetMinStake(p peer.ID) (types.Amount, error)
- func (ps *PolicyService) GetTreasuryWhitelist(p peer.ID) ([]types.ID, error)
- func (ps *PolicyService) HandleNewStream(s inet.Stream)
Constants ¶
View Source
const ( PolicyProtocol = "/policy/" PolicyProtocolVersion = "1.0.0" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PolicyService ¶
type PolicyService struct {
// contains filtered or unexported fields
}
PolicyService is a libp2p network protocol that allows other peers to query this node for its policy preferences.
func NewPolicyService ¶
func NewPolicyService(ctx context.Context, network *net.Network, params *params.NetworkParams, policy *policy2.Policy) *PolicyService
NewPolicyService returns a new PolicyService and starts the stream handler.
func (*PolicyService) GetBlocksizeSoftLimit ¶
func (ps *PolicyService) GetBlocksizeSoftLimit(p peer.ID) (uint32, error)
GetBlocksizeSoftLimit queries the remote peer for their blocksize soft limit policy
func (*PolicyService) GetFeePerKb ¶
GetFeePerKb queries the remote peer for their fee per kb policy
func (*PolicyService) GetMinStake ¶
GetMinStake queries the remote peer for their minimum stake policy
func (*PolicyService) GetTreasuryWhitelist ¶
GetTreasuryWhitelist queries the remote peer for their treasury whitelist
func (*PolicyService) HandleNewStream ¶
func (ps *PolicyService) HandleNewStream(s inet.Stream)
Click to show internal directories.
Click to hide internal directories.