scripts/ reorganization: - Sort 14 loose root scripts into subfolders: blockchain/ (genesis, proposer, mock chain, testnet BTC) dev/ (CLI wrapper, dev services, OpenAPI gen, systemd setup, domain proxy) ops/ (coordinator proxy, remote tunnel) gpu/ (miner workflow) - Merge scripts/testing/ into scripts/test/ (eliminate duplicate folder) - Create scripts/examples/ for usage demos and simulations Root-level cleanup: - Move home/ (12 simulation scripts) → scripts/examples/ - Move dev-utils/ (2 files) → scripts/dev/ - Move protocols/receipts/sample → tests/fixtures/ - Delete stale src/ (duplicate of apps/blockchain-node/src/) - Remove empty home/, dev-utils/, protocols/ directories Documentation updates: - Update docs/6_architecture/8_codebase-structure.md tree and table - Update root README.md tree to reflect new structure
22 lines
485 B
Python
22 lines
485 B
Python
#!/usr/bin/env python3
|
|
"""
|
|
Test the Transaction model directly
|
|
"""
|
|
|
|
# Test creating a transaction model instance
|
|
tx_data = {
|
|
"tx_hash": "0xtest123",
|
|
"sender": "0xsender",
|
|
"recipient": "0xrecipient",
|
|
"payload": {"test": "data"}
|
|
}
|
|
|
|
print("Transaction data:")
|
|
print(tx_data)
|
|
|
|
# Simulate what the router does
|
|
print("\nExtracting fields:")
|
|
print(f"tx_hash: {tx_data.get('tx_hash')}")
|
|
print(f"sender: {tx_data.get('sender')}")
|
|
print(f"recipient: {tx_data.get('recipient')}")
|