mirror of
https://github.com/monero-project/monero.git
synced 2026-07-28 14:47:15 -07:00
functional_tests: avoid sweep_single spent status race
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
import time
|
||||||
import util_resources
|
import util_resources
|
||||||
import pprint
|
import pprint
|
||||||
from deepdiff import DeepDiff
|
from deepdiff import DeepDiff
|
||||||
@@ -684,6 +685,8 @@ class TransferTest():
|
|||||||
res = self.wallet[0].sweep_single('44Kbx4sJ7JDRDV5aAhLJzQCjDz2ViLRduE3ijDZu3osWKBjMGkV1XPk4pfDUMqt1Aiezvephdqm6YD19GKFD9ZcXVUTp6BW', key_image = ki)
|
res = self.wallet[0].sweep_single('44Kbx4sJ7JDRDV5aAhLJzQCjDz2ViLRduE3ijDZu3osWKBjMGkV1XPk4pfDUMqt1Aiezvephdqm6YD19GKFD9ZcXVUTp6BW', key_image = ki)
|
||||||
assert len(res.tx_hash) == 64
|
assert len(res.tx_hash) == 64
|
||||||
tx_hash = res.tx_hash
|
tx_hash = res.tx_hash
|
||||||
|
# Avoid racing the txpool relay state update before checking spent status
|
||||||
|
time.sleep(0.1)
|
||||||
res = daemon.is_key_image_spent([ki])
|
res = daemon.is_key_image_spent([ki])
|
||||||
assert len(res.spent_status) == 1
|
assert len(res.spent_status) == 1
|
||||||
assert res.spent_status[0] == 2
|
assert res.spent_status[0] == 2
|
||||||
|
|||||||
Reference in New Issue
Block a user