// PeerCount returns the number of connected peers
@ -23,7 +23,7 @@ func (s *PublicNetAPI) PeerCount() hexutil.Uint {
returnhexutil.Uint(s.net.GetPeerCount())
}
// NetworkID ...
func(s*PublicNetAPI)NetworkID()string{
returnfmt.Sprintf("%d",1)// TODO(ricl): we should add support for network id (https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version)
// Version returns the network version, i.e. network ID identifying which network we are using
func(s*PublicNetAPI)Version()string{
returnfmt.Sprintf("%d",s.networkVersion)// TODO(ricl): we should add support for network id (https://github.com/ethereum/wiki/wiki/JSON-RPC#net_version)
// If length of pendingTransactions is greater than TxPoolLimit then by greedy take the TxPoolLimit recent transactions.
iflen(node.pendingTransactions)>TxPoolLimit{
utils.GetLogInstance().Warn("Got more transactions than expected and this could caused OOM","num",len(newTxs),"totalPending",len(node.pendingTransactions))
utils.GetLogInstance().Debug("PROPOSING NEW BLOCK ------------------------------------------------","blockNum",node.Blockchain().CurrentBlock().NumberU64()+1,"threshold",threshold,"pendingTransactions",len(node.pendingTransactions))