bool OnOutgoingConnection(ConnID id, const CConnection& conn, const CConnection& resolved_conn) final { if (resolved_conn.GetNetConfig().message_start == mainnet_message_start) printf("mainnet connected first\n"); else if (resolved_conn.GetNetConfig().message_start == testnet_message_start) printf("testnet connected first\n"); Shutdown(); return true; }