mobile: better api for java users (#21580)
* (mobile): Adds string representations for types * mobile: better interfaces add stringer to types Co-authored-by: sarath <sarath@melvault.com>
This commit is contained in:
committed by
GitHub
parent
9a39c6bcb1
commit
2c097bb7a2
@ -90,6 +90,22 @@ func NewNodeConfig() *NodeConfig {
|
||||
return &config
|
||||
}
|
||||
|
||||
// AddBootstrapNode adds an additional bootstrap node to the node config.
|
||||
func (conf *NodeConfig) AddBootstrapNode(node *Enode) {
|
||||
conf.BootstrapNodes.Append(node)
|
||||
}
|
||||
|
||||
// EncodeJSON encodes a NodeConfig into a JSON data dump.
|
||||
func (conf *NodeConfig) EncodeJSON() (string, error) {
|
||||
data, err := json.Marshal(conf)
|
||||
return string(data), err
|
||||
}
|
||||
|
||||
// String returns a printable representation of the node config.
|
||||
func (conf *NodeConfig) String() string {
|
||||
return encodeOrError(conf)
|
||||
}
|
||||
|
||||
// Node represents a Geth Ethereum node instance.
|
||||
type Node struct {
|
||||
node *node.Node
|
||||
|
Reference in New Issue
Block a user