Add missing getblockhash method to DogecoinClient for late payment scanning
The crypto watcher's late payment scanner was failing with: 'DogecoinClient' object has no attribute 'getblockhash' Added getblockhash() method to both DogecoinClient and MockDogecoinClient: - Uses standard Bitcoin RPC getblockhash call with block height parameter - Enables proper Dogecoin late payment detection in production - Required for crypto watcher to scan for missed payments Critical for production Dogecoin support.
This commit is contained in:
parent
c3a3039c00
commit
2a73a631bc
1 changed files with 8 additions and 0 deletions
|
|
@ -310,6 +310,10 @@ class DogecoinClient:
|
|||
"""Get current block height."""
|
||||
return self._call("getblockcount")
|
||||
|
||||
def getblockhash(self, block_height: int) -> str:
|
||||
"""Get block hash for a specific block height."""
|
||||
return self._call("getblockhash", [block_height])
|
||||
|
||||
def getnetworkinfo(self) -> Dict[str, Any]:
|
||||
"""Get network status information."""
|
||||
return self._call("getnetworkinfo")
|
||||
|
|
@ -435,6 +439,10 @@ class MockDogecoinClient:
|
|||
def getblockcount(self) -> int:
|
||||
return 5500000 # Mock block height
|
||||
|
||||
def getblockhash(self, block_height: int) -> str:
|
||||
"""Mock block hash for testing."""
|
||||
return f"mock_block_hash_{block_height}"
|
||||
|
||||
def getnetworkinfo(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"version": 1140200,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue