Documentation ¶
Overview ¶
Copyright 2020 The the-blockchain-bar Authors This file is part of the the-blockchain-bar library.
The the-blockchain-bar library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The the-blockchain-bar library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
Copyright 2020 The the-blockchain-bar Authors This file is part of the the-blockchain-bar library.
The the-blockchain-bar library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The the-blockchain-bar library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
Copyright 2020 The the-blockchain-bar Authors This file is part of the the-blockchain-bar library.
The the-blockchain-bar library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The the-blockchain-bar library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
Copyright 2020 The the-blockchain-bar Authors This file is part of the the-blockchain-bar library.
The the-blockchain-bar library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The the-blockchain-bar library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
Copyright 2020 The the-blockchain-bar Authors This file is part of the the-blockchain-bar library.
The the-blockchain-bar library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The the-blockchain-bar library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func Mine(ctx context.Context, pb PendingBlock) (database.Block, error)
- type AddPeerRes
- type BalancesRes
- type ErrRes
- type NextNonceReq
- type NextNonceRes
- type Node
- func (n *Node) AddPeer(peer PeerNode)
- func (n *Node) AddPendingTX(tx database.SignedTx, fromPeer PeerNode) error
- func (n *Node) ChangeMiningDifficulty(newDifficulty uint64)
- func (n *Node) IsKnownPeer(peer PeerNode) bool
- func (n *Node) LatestBlockHash() database.Hash
- func (n *Node) RemovePeer(peer PeerNode)
- func (n *Node) Run(ctx context.Context, isSSLDisabled bool, sslEmail string) error
- type PeerNode
- type PendingBlock
- type StatusRes
- type SyncRes
- type TxAddReq
- type TxAddRes
Constants ¶
const DefaultBootstrapAcc = "0x50543e830590fD03a0301fAA0164d731f0E2ff7D"
The Web3Coach's Genesis account with 1M TBB tokens
const DefaultBootstrapIp = "node.tbb.web3.coach"
const DefaultIP = "127.0.0.1"
const DefaultMiner = "0x0000000000000000000000000000000000000000"
const DefaultMiningDifficulty = 2
const HttpSSLPort = 443
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddPeerRes ¶
type BalancesRes ¶
type NextNonceReq ¶
type NextNonceReq struct {
Account string `json:"account"`
}
type NextNonceRes ¶
type NextNonceRes struct {
Nonce uint `json:"nonce"`
}
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) AddPendingTX ¶
func (*Node) ChangeMiningDifficulty ¶
func (*Node) IsKnownPeer ¶
func (*Node) LatestBlockHash ¶
func (*Node) RemovePeer ¶
type PeerNode ¶
type PeerNode struct { IP string `json:"ip"` Port uint64 `json:"port"` IsBootstrap bool `json:"is_bootstrap"` Account common.Address `json:"account"` NodeVersion string `json:"node_version"` // contains filtered or unexported fields }
func NewPeerNode ¶
func (PeerNode) ApiProtocol ¶
func (PeerNode) TcpAddress ¶
type PendingBlock ¶
type PendingBlock struct {
// contains filtered or unexported fields
}