Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTransactionsPerBlockLimitReached = errors.New("cannot generate proof-of-work - transaction per block limit reached") ErrBlockHeightTooHistoric = errors.New("cannot generate proof-of-work - block data is too historic") )
View Source
var ( ErrPartyBanned = errors.New("the network's spam rules has banned this key from submitting the transaction") ErrPartyBannedPoW = errors.New("the network's spam rules has banned this key from submitting all transaction") ErrPartyWillBeBanned = errors.New("submitting this transaction will cause this key to be temporarily banned by the the network") )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler() *Handler
func (*Handler) CheckSubmission ¶
func (s *Handler) CheckSubmission(req *walletpb.SubmitTransactionRequest, newStats *nodetypes.SpamStatistics) error
CheckSubmission return an error if we are banned from making this type of transaction or if submitting the transaction will result in a banning.
func (*Handler) GenerateProofOfWork ¶
func (s *Handler) GenerateProofOfWork(pubKey string, st *nodetypes.SpamStatistics) (*commandspb.ProofOfWork, error)
Generate returns a proof-of-work with difficult that respects the history of transactions sent in against a particular block.
Click to show internal directories.
Click to hide internal directories.