Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Specify Currency/Chain on ResolveRequest #831
When validating the resolve request for swaps we check that the amount matches the expected deal amount, we check cltvdelta, but we don't actually check whether it's the right currency. Theoretically a dishonest peer could attempt to pay us litecoin using the same rHash as for a deal where we expect to receive bitcoin, and xud wouldn't notice the difference because all it sees is the resolve request.
We should add a field to specify the chain or currency to the resolve request and check that this matches the agreed deal when validating a resolve request.