From 28cc7479fe7e5340b1a23fb8c6ec3a7581741314 Mon Sep 17 00:00:00 2001 From: Captain Date: Tue, 23 Feb 2021 11:00:07 +0000 Subject: [PATCH] DERO-HE STARGATE Testnet Release10 --- config/version.go | 2 +- p2p/controller.go | 8 +++++++- p2p/rpc_object_request.go | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/config/version.go b/config/version.go index 5ffe2cc..faea314 100644 --- a/config/version.go +++ b/config/version.go @@ -20,4 +20,4 @@ import "github.com/blang/semver" // right now it has to be manually changed // do we need to include git commitsha?? -var Version = semver.MustParse("3.2.0-12.DEROHE.STARGATE+22022021") +var Version = semver.MustParse("3.2.0-14.DEROHE.STARGATE+23022021") diff --git a/p2p/controller.go b/p2p/controller.go index 092fe4c..66090dc 100644 --- a/p2p/controller.go +++ b/p2p/controller.go @@ -411,7 +411,13 @@ func process_connection(conn net.Conn, remote_addr *net.TCPAddr, incoming, sync_ c.logger = logger.WithFields(log.Fields{"RIP": remote_addr.String(), "DIR": "OUT"}) } go func() { - defer globals.Recover() + //defer globals.Recover() + defer func() { + if r := recover(); r != nil { + rlog.Warnf("Recovered while handling connection, Stack trace below", r) + rlog.Warnf("Stack trace \n%s", debug.Stack()) + } + }() //RPCSERVER.ServeConn(rconn.ServerConn) // start single threaded rpc server with GOB encoding RPCSERVER.ServeCodec(NewCBORServerCodec(rconn.ServerConn)) // use CBOR encoding on rpc }() diff --git a/p2p/rpc_object_request.go b/p2p/rpc_object_request.go index 00b5414..a600fa3 100644 --- a/p2p/rpc_object_request.go +++ b/p2p/rpc_object_request.go @@ -33,7 +33,10 @@ func (connection *Connection) GetObject(request ObjectList, response *Objects) e for i := range request.Block_list { // find the block var cbl Complete_Block - bl, _ := chain.Load_BL_FROM_ID(request.Block_list[i]) + bl, err := chain.Load_BL_FROM_ID(request.Block_list[i]) + if err != nil{ + return err + } cbl.Block = bl.Serialize() for j := range bl.Tx_hashes { var tx_bytes []byte