lightninglabs / taproot-assets

A layer 1 daemon, for the Taproot Assets Protocol specification, written in Go (golang)
MIT License
463 stars 110 forks source link

[feature]: Add integration test for concurrent transfers with delayed block mining #1081

Open ffranr opened 2 months ago

ffranr commented 2 months ago

This issue stems from this comment by @jharveyb : https://github.com/lightninglabs/taproot-assets/pull/1068#issuecomment-2286482522

It would be beneficial to add an integration test that simulates multiple transfers running concurrently. This can be achieved by delaying the mining of a block. The test should submit a first transfer, then a second one, ensuring both are pending confirmation until the block is mined. Once the block is mined, both transfers should proceed as expected. This test would help verify the correct handling of concurrent transfers under these conditions.

ffranr commented 2 months ago

Might also be a good opportunity to refactor this itest: https://github.com/lightninglabs/taproot-assets/pull/1074#discussion_r1715479520

jharveyb commented 2 months ago

Aye - and once the proof resume on restart work is all in I think we should be able to restart before that conf comes in and resume all parcels correctly if the conf happens while we are shut down.