Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DiscoveryNotifee ¶
type DiscoveryNotifee struct {
// contains filtered or unexported fields
}
DiscoveryNotifee ...
func (*DiscoveryNotifee) HandlePeerFound ¶
func (n *DiscoveryNotifee) HandlePeerFound(pi peerstore.PeerInfo)
HandlePeerFound ...
type Keys ¶
type Keys struct { Priv *ecdsa.PrivateKey Pub *ecdsa.PublicKey }
Keys ... note: any concern keeping these in memory? Maybe only fetch when needed?
type Props ¶
type Props struct { // Note: it's preferable to not use abbreviations if it means uppercasing all the letters. Acronyms are OK. Context context.Context SubscriberChannel chan interface{} CancelMinersChannel chan struct{} Host host.Host Store nodestore.Interface // store is used to temporarily store blocks and txs for mining and verification Pubsub *floodsub.PubSub // note: how to make this into an interface? P2P p2p.Interface Keys Keys Protobyff protobuff.Interface BlockDifficulty int }
Props ...
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service ...
func (*Service) BroadcastMinedBlock ¶
func (s *Service) BroadcastMinedBlock(minedBlock *miner.MinedBlock) error
BroadcastMinedBlock ... note: only mainchain blocks get broadcast
func (*Service) BroadcastTransaction ¶
func (s *Service) BroadcastTransaction(tx *statechain.Transaction) (*nodetypes.SendTxResponse, error)
BroadcastTransaction ...
Click to show internal directories.
Click to hide internal directories.