Skip to content

Commit

Permalink
Merge pull request #26 from guydavis/dev
Browse files Browse the repository at this point in the history
Sync to main.
  • Loading branch information
guydavis authored Dec 31, 2022
2 parents 1ea582c + 4d6da67 commit 18acc31
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ The purpose of this minor release is to get out a few fixes. No new features in
- Adds basic condition checks for harvester operations.
- Adds integration for Pushover (mobile notifications).

[Unreleased]: https://github.com/martomi/chiadog/compare/v0.7.2...main
[Unreleased]: https://github.com/martomi/chiadog/compare/v0.7.4...main

[0.7.4]: https://github.com/martomi/chiadog/compare/v0.7.3...v0.7.4

[0.7.3]: https://github.com/martomi/chiadog/compare/v0.7.2...v0.7.3

[0.7.2]: https://github.com/martomi/chiadog/compare/v0.7.1...v0.7.2

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ python-dateutil~=2.8.1
retry==0.9.2
pygtail==0.11.1
paho-mqtt
json-logic-qubit
json-logic-qubit
2 changes: 2 additions & 0 deletions tests/chia_log/logs/wallet_added_coin/nominal-after-1.5.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
15:37:11.668 wallet chia.wallet.wallet_node : INFO request coin: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc{'coin': {'amount': 250000000000,
16:53:59.677 wallet chia.wallet.wallet_node : INFO request coin: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff{'coin': {'amount': 1750000000000,
2 changes: 2 additions & 0 deletions tests/chia_log/logs/wallet_added_coin/nominal-after-1.6.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
06:33:18.310 wallet chia.wallet.wallet_node : INFO request coin: ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccCoinState { coin: Coin { parent_coin_info: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc, puzzle_hash: cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc, amount: 250000000000 }, spent_height: None, created_height: Some(0000000) }
06:33:18.310 wallet chia.wallet.wallet_node : INFO request coin: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffCoinState { coin: Coin { parent_coin_info: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, puzzle_hash: 1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, amount: 1750000000000 }, spent_height: None, created_height: Some(0000000) }
15 changes: 12 additions & 3 deletions tests/chia_log/parsers/test_wallet_added_coin_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@ def setUp(self) -> None:
self.parser = WalletAddedCoinParser()
self.example_logs_path = Path(__file__).resolve().parents[1] / "logs/wallet_added_coin"
with open(self.example_logs_path / "nominal-before-1.4.0.txt", encoding="UTF-8") as f:
self.nominal_logs_before = f.read()
self.nominal_logs_before_140 = f.read()
with open(self.example_logs_path / "nominal-after-1.4.0.txt", encoding="UTF-8") as f:
self.nominal_logs_after = f.read()
self.nominal_logs_after_140 = f.read()
with open(self.example_logs_path / "nominal-after-1.5.1.txt", encoding="UTF-8") as f:
self.nominal_logs_after_151 = f.read()
with open(self.example_logs_path / "nominal-after-1.6.1.txt", encoding="UTF-8") as f:
self.nominal_logs_after_161 = f.read()

def testBasicParsing(self):
for nominal_logs in [self.nominal_logs_before, self.nominal_logs_after]:
for nominal_logs in [
self.nominal_logs_before_140,
self.nominal_logs_after_140,
self.nominal_logs_after_151,
self.nominal_logs_after_161,
]:
added_coins = self.parser.parse(nominal_logs)
total_mojos = 0
for coin in added_coins:
Expand Down

0 comments on commit 18acc31

Please sign in to comment.