Documentation ¶
Index ¶
- Constants
- Variables
- func BlockGenerator(ctx context.Context, d *daemon) error
- func BlocksCollection(ctx context.Context, d *daemon) error
- func CheckDB() bool
- func Confirmations(ctx context.Context, d *daemon) error
- func DBLock()
- func DBUnlock()
- func Disseminator(ctx context.Context, d *daemon) error
- func ExternalNetwork(ctx context.Context, d *daemon) error
- func InitialLoad(logger *log.Entry) error
- func IsReachable(host string, blockID int64, ch0 chan string, logger *log.Entry)
- func Monitoring(w http.ResponseWriter, r *http.Request)
- func QueueParserBlocks(ctx context.Context, d *daemon) error
- func QueueParserTx(ctx context.Context, d *daemon) error
- func ReplaceBlocksFromHost(ctx context.Context, host string, blockID, replaceCount int64) error
- func Scheduler(ctx context.Context, d *daemon) error
- func SendExternalTransaction() error
- func StartDaemons(ctx context.Context, daemonsToStart []string)
- func UpdateChain(ctx context.Context, d *daemon, host string, maxBlockID int64) (err error)
- func WaitDB(ctx context.Context) error
- func WaitForSignals()
- func WaitStopTime()
- type DelayedTx
Constants ¶
const (
// WordSize is size of word in file
WordSize = 5
)
Variables ¶
var ( errors.New("All nodes unavailable") )ErrNodesUnavailable =
var ( // MonitorDaemonCh is monitor daemon channel MonitorDaemonCh = make(chan []string, 100) )
var SigChan chan os.Signal
SigChan is a channel
Functions ¶
func BlockGenerator ¶
BlockGenerator is daemon that generates blocks
func BlocksCollection ¶
BlocksCollection collects and parses blocks
func Confirmations ¶
Confirmations gets and checks blocks from nodes Getting amount of nodes, which has the same hash as we do
func Disseminator ¶
Disseminator is send to all nodes from nodes_connections the following data if we are full node(miner): sends blocks and transactions hashes else send the full transactions
func ExternalNetwork ¶
ExternalNetwork sends txinfo to the external network
func InitialLoad ¶
func IsReachable ¶
IsReachable checks if there is blockID on the host
func Monitoring ¶
func Monitoring(w http.ResponseWriter, r *http.Request)
Monitoring starts monitoring
func QueueParserBlocks ¶
QueueParserBlocks parses and applies blocks from the queue
func QueueParserTx ¶
QueueParserTx parses transaction from the queue
func ReplaceBlocksFromHost ¶
ReplaceBlocksFromHost replaces blockchain received from the host. Number (replaceCount) of blocks starting from blockID will be re-played.
func SendExternalTransaction ¶
func SendExternalTransaction() error
func StartDaemons ¶
StartDaemons starts daemons
func UpdateChain ¶
UpdateChain load from host all blocks from our last block to maxBlockID
Types ¶
type DelayedTx ¶
type DelayedTx struct {
// contains filtered or unexported fields
}
DelayedTx represents struct which works with delayed contracts
func (*DelayedTx) RunForBlockID ¶
RunForBlockID creates the transactions that need to be run for blockID