|
|
@ -111,7 +111,7 @@ class Test_SimpleConfig(SequentialTestCase): |
|
|
|
self.assertEqual({"something": "a"}, result) |
|
|
|
|
|
|
|
def test_depth_target_to_fee(self): |
|
|
|
config = SimpleConfig({}) |
|
|
|
config = SimpleConfig(self.options) |
|
|
|
config.mempool_fees = [[49, 100110], [10, 121301], [6, 153731], [5, 125872], [1, 36488810]] |
|
|
|
self.assertEqual( 2 * 1000, config.depth_target_to_fee(1000000)) |
|
|
|
self.assertEqual( 6 * 1000, config.depth_target_to_fee( 500000)) |
|
|
@ -134,7 +134,7 @@ class Test_SimpleConfig(SequentialTestCase): |
|
|
|
self.assertEqual( 1 * 1000, config.depth_target_to_fee(10 ** 8)) |
|
|
|
|
|
|
|
def test_fee_to_depth(self): |
|
|
|
config = SimpleConfig({}) |
|
|
|
config = SimpleConfig(self.options) |
|
|
|
config.mempool_fees = [[49, 100000], [10, 120000], [6, 150000], [5, 125000], [1, 36000000]] |
|
|
|
self.assertEqual(100000, config.fee_to_depth(500)) |
|
|
|
self.assertEqual(100000, config.fee_to_depth(50)) |
|
|
@ -145,6 +145,7 @@ class Test_SimpleConfig(SequentialTestCase): |
|
|
|
self.assertEqual(370000, config.fee_to_depth(6.5)) |
|
|
|
self.assertEqual(370000, config.fee_to_depth(6)) |
|
|
|
self.assertEqual(495000, config.fee_to_depth(5.5)) |
|
|
|
self.assertEqual(36495000, config.fee_to_depth(0.5)) |
|
|
|
|
|
|
|
|
|
|
|
class TestUserConfig(SequentialTestCase): |
|
|
|