monero transaction checks (#207)

* Bob now waits for his XMR transfer to the A+B wallet to have 10 confirmations before notifying Alice that the XMR is locked.
* Alice now rejects the locked Monero if there is more than one block left before she can spend the funds (1 block freedom is in case of network latency on Alice's side). This eliminates Bob's ability to double spend and allows Alice to sweep funds to her primary wallet from the A+B wallet in a reasonable time frame.
* Sweeping received XMR to the primary wallet is now the default behavior.
* A+B swap wallets are created with a restore height set for quick wallet creation in production where the blockchain is big.
* Fixes SleepWithContext moving it into the common package and having it return an error when the sleep is interrupted by the context being canceled.
* Fixed timeout and context handling in integration tests
* Added new GetChainHeight method that queries monerod instead of monero-wallet-rpc
This commit is contained in:
Dmitry Holodov
2022-10-31 00:26:25 -05:00
committed by GitHub
parent 5a0b10a9fe
commit cdcd4db15d
35 changed files with 746 additions and 573 deletions

View File

@@ -42,7 +42,7 @@ var StagenetConfig = Config{
DataDir: path.Join(baseDir, "stagenet"),
MoneroDaemonHost: "node.sethforprivacy.com",
MoneroDaemonPort: 38089, // Seth is not using the default stagenet value of 38081 (so don't use our constant)
ContractAddress: ethcommon.HexToAddress("0x64e902cD8A29bBAefb9D4e2e3A24d8250C606ee7"),
ContractAddress: ethcommon.HexToAddress("0x5F8Cf66C4c59d398052aA75D46Ce48e7fA09A83E"),
Bootnodes: []string{
"/ip4/134.122.115.208/tcp/9900/p2p/12D3KooWDqCzbjexHEa8Rut7bzxHFpRMZyDRW1L6TGkL1KY24JH5",
"/ip4/143.198.123.27/tcp/9900/p2p/12D3KooWSc4yFkPWBFmPToTMbhChH3FAgGH96DNzSg5fio1pQYoN",