@@ -11,7 +11,7 @@ namespace Monero.Test;
1111public class MoneroDaemonRpcFixture : IDisposable
1212{
1313 public readonly TestContext BINARY_BLOCK_CTX = new ( ) ;
14-
14+
1515 public MoneroDaemonRpc Daemon ;
1616 public MoneroWalletRpc Wallet ;
1717 public bool IsRestricted ;
@@ -21,7 +21,7 @@ public MoneroDaemonRpcFixture()
2121 Daemon = TestUtils . GetDaemonRpc ( ) ;
2222 //Wallet = TestUtils.GetWalletRpc();
2323 IsRestricted = Daemon . IsRestricted ( ) ;
24-
24+
2525 BINARY_BLOCK_CTX . hasHex = false ;
2626 BINARY_BLOCK_CTX . headerIsFull = false ;
2727 BINARY_BLOCK_CTX . hasTxs = true ;
@@ -33,11 +33,11 @@ public MoneroDaemonRpcFixture()
3333 BINARY_BLOCK_CTX . txContext . fromBinaryBlock = true ;
3434
3535 TestUtils . WALLET_TX_TRACKER . Reset ( ) ; // all wallets need to wait for txs to confirm to reliably sync
36-
36+
3737 // Wait for some blocks to mine
3838 GenUtils . WaitFor ( 10000 ) ;
3939 }
40-
40+
4141 public void Dispose ( )
4242 {
4343 GC . SuppressFinalize ( this ) ;
@@ -58,11 +58,11 @@ public class TestMoneroDaemonRpc : IClassFixture<MoneroDaemonRpcFixture>
5858 private static TestContext BINARY_BLOCK_CTX = new ( ) ;
5959
6060 private MoneroDaemonRpcFixture fixture ;
61-
61+
6262 public TestMoneroDaemonRpc ( MoneroDaemonRpcFixture fixture )
6363 {
6464 BINARY_BLOCK_CTX = fixture . BINARY_BLOCK_CTX ;
65-
65+
6666 daemon = fixture . Daemon ;
6767 wallet = fixture . Wallet ;
6868
@@ -80,7 +80,7 @@ public TestMoneroDaemonRpc(MoneroDaemonRpcFixture fixture)
8080 }
8181
8282 #region Non Relays Tests
83-
83+
8484 [ Fact ]
8585 public void TestGetVersion ( )
8686 {
@@ -1124,7 +1124,7 @@ public void TestMining()
11241124 daemon . StartMining ( address , 1 , false , true ) ;
11251125
11261126 GenUtils . WaitFor ( 30 ) ;
1127-
1127+
11281128 // stop mining
11291129 daemon . StopMining ( ) ;
11301130 }
@@ -1168,7 +1168,7 @@ public void TestGetMiningStatus()
11681168 }
11691169 catch ( MoneroError e )
11701170 {
1171- throw e ;
1171+ throw ;
11721172 }
11731173 finally
11741174 {
@@ -1403,7 +1403,7 @@ public void TestBlockListener()
14031403 }
14041404 catch ( MoneroError e )
14051405 {
1406- throw e ;
1406+ throw ;
14071407 }
14081408 finally
14091409 {
@@ -1432,7 +1432,7 @@ private static void MineBlocks()
14321432 MoneroUtils . Log ( 0 , e . Message ) ;
14331433 }
14341434 }
1435-
1435+
14361436 private static void TestBlockHeader ( MoneroBlockHeader ? header , bool isFull )
14371437 {
14381438 Assert . NotNull ( header ) ;
@@ -1627,9 +1627,9 @@ private static void TestTx(MoneroTx? tx, TestContext? ctx)
16271627 if ( tx . IsConfirmed ( ) == true )
16281628 {
16291629 Assert . NotNull ( tx . GetBlock ( ) ) ;
1630- Assert . True ( tx . GetBlock ( ) . GetTxs ( ) . Contains ( tx ) ) ;
1630+ Assert . Contains ( tx , tx . GetBlock ( ) . GetTxs ( ) ) ;
16311631 Assert . True ( tx . GetBlock ( ) . GetHeight ( ) > 0 ) ;
1632- Assert . True ( tx . GetBlock ( ) . GetTxs ( ) . Contains ( tx ) ) ;
1632+ Assert . Contains ( tx , tx . GetBlock ( ) . GetTxs ( ) ) ;
16331633 Assert . True ( tx . GetBlock ( ) . GetHeight ( ) > 0 ) ;
16341634 Assert . True ( tx . GetBlock ( ) . GetTimestamp ( ) > 0 ) ;
16351635 Assert . True ( tx . GetRelay ( ) ) ;
@@ -1742,7 +1742,7 @@ private static void TestTx(MoneroTx? tx, TestContext? ctx)
17421742 if ( ctx . fromBinaryBlock == true ) Assert . Null ( tx . GetFullHex ( ) ) ; // TODO: GetBlocksByHeight() has inconsistent client-side pruning
17431743 else Assert . True ( tx . GetFullHex ( ) . Length > 0 ) ;
17441744 if ( ctx . fromBinaryBlock == true ) Assert . Null ( tx . GetRctSigPrunable ( ) ) ; // TODO: GetBlocksByHeight() has inconsistent client-side pruning
1745- //else Assert.NotNull((tx.GetRctSigPrunable()); // TODO: define and test this
1745+ //else Assert.NotNull((tx.GetRctSigPrunable()); // TODO: define and test this
17461746 Assert . False ( tx . IsDoubleSpendSeen ( ) ) ;
17471747 if ( tx . IsConfirmed ( ) == true )
17481748 {
@@ -2058,8 +2058,6 @@ private static void TestPeer(MoneroPeer peer)
20582058 Assert . True ( peer . GetCurrentUpload ( ) >= 0 ) ;
20592059 Assert . True ( peer . GetHeight ( ) >= 0 ) ;
20602060 Assert . True ( peer . GetLiveTime ( ) >= 0 ) ;
2061- Assert . NotNull ( peer . IsLocalIp ( ) ) ;
2062- Assert . NotNull ( peer . IsLocalHost ( ) ) ;
20632061 Assert . True ( peer . GetNumReceives ( ) >= 0 ) ;
20642062 Assert . True ( peer . GetReceiveIdleTime ( ) >= 0 ) ;
20652063 Assert . True ( peer . GetNumSends ( ) >= 0 ) ;
@@ -2076,7 +2074,6 @@ private static void TestKnownPeer(MoneroPeer peer, bool fromConnection)
20762074 Assert . True ( peer . GetHost ( ) . Length > 0 ) ;
20772075 Assert . True ( peer . GetPort ( ) > 0 ) ;
20782076 Assert . True ( peer . GetRpcPort ( ) == null || peer . GetRpcPort ( ) >= 0 ) ;
2079- Assert . NotNull ( peer . IsOnline ( ) ) ;
20802077 //if (peer.GetRpcCreditsPerHash() != null) TestUtils.testUnsignedBigInteger(peer.GetRpcCreditsPerHash());
20812078 if ( fromConnection ) Assert . Null ( peer . GetLastSeenTimestamp ( ) ) ;
20822079 else
@@ -2145,7 +2142,7 @@ private static void TestSubmitTxResultGood(MoneroSubmitTxResult result)
21452142 catch ( Exception e )
21462143 {
21472144 MoneroUtils . Log ( 0 , "Submit result is not good" ) ;
2148- throw e ;
2145+ throw ;
21492146 }
21502147 }
21512148
@@ -2224,7 +2221,7 @@ private static void TestSubmitThenRelay(List<MoneroTx> txs)
22242221 catch ( Exception e )
22252222 {
22262223 daemon . FlushTxPool ( txHashes ) ; // flush txs when relay fails to prevent double spends in other tests
2227- throw e ;
2224+ throw ;
22282225 }
22292226
22302227 // wait for txs to be relayed // TODO (monero-project): all txs should be relayed: https://github.com/monero-project/monero/issues/8523
0 commit comments