The DB.Connect function inside internal/db/p2p.go lacks a db.p2p == nil check that is present in its sibling Disconnect function. If you start a node with P2P disabled, db.p2p will remain nil. As a result, a call made ondb.p2p.Connect will panic.
Over HTTP, this will degrade to a 500 error. However, on embedded clients, this will result in a crash.
The
DB.Connectfunction insideinternal/db/p2p.golacks adb.p2p == nilcheck that is present in its siblingDisconnectfunction. If you start a node with P2P disabled,db.p2pwill remain nil. As a result, a call made ondb.p2p.Connectwill panic.Over HTTP, this will degrade to a 500 error. However, on embedded clients, this will result in a crash.