WIP: Add Pakcoin hex output support and incremental backup recovery #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "(deleted):pakcoin-hex-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds support for Pakcoin (PAK) using the new getblock hex output capability and improves the backup/recovery system.
Changes
Uses getblock($hash, 0) for Pakcoin to retrieve raw hex block data
Other coins continue using legacy getblock($hash, false)
Unified RPC block fetching logic with verbosity parameter
Added support for _backup_1 and _backup_2 incremental backups
Automatically selects most recent backup based on file modification time
Falls back to full AUX backup if incremental backups don't match
Fixed json_decode → unserialize bug in recovery code (line 678)
Fixed undefined $offset in exception message
Changed incomplete block handling from exception to graceful break
Removed unused reconstructBlockFromRpc() function
Removed unused encodeVarInt() function
Added resume offset logging for better debugging
Testing
Verified with Pakcoin node at 127.0.0.1:7966
Tested getblock verbosity 0, 1, 2 - all working
Recovery from orphaned blocks tested successfully
Pull request closed