Skip to content

Commit cff0433

Browse files
marioevzlightclient
authored andcommitted
Remove withdrawals test with index skip
1 parent 7860253 commit cff0433

File tree

1 file changed

+0
-147
lines changed

1 file changed

+0
-147
lines changed

fillers/withdrawals/withdrawals.py

Lines changed: 0 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -651,150 +651,3 @@ def test_withdrawals_overflowing_balance(_):
651651
),
652652
}
653653
yield BlockchainTest(pre=pre, post=post, blocks=blocks)
654-
655-
656-
@test_from(WITHDRAWALS_FORK)
657-
def test_withdrawals_invalid_skip_indexes(_):
658-
"""
659-
Test Withdrawal blocks starting from the incorrect index (!=0)
660-
or by skipping an index between blocks
661-
"""
662-
pre = {
663-
TestAddress: Account(
664-
balance=1000000000000000000000,
665-
nonce=0,
666-
),
667-
to_address(0x100A): Account(
668-
code=SET_STORAGE,
669-
),
670-
to_address(0x100B): Account(
671-
code=SET_STORAGE,
672-
),
673-
to_address(0x200A): Account(
674-
code=SET_STORAGE,
675-
),
676-
to_address(0x200B): Account(
677-
code=SET_STORAGE,
678-
),
679-
}
680-
681-
block_1_invalid = Block(
682-
# Skip start index
683-
txs=[
684-
Transaction(
685-
nonce=0,
686-
gas_limit=100000,
687-
to=to_address(0x100A),
688-
)
689-
],
690-
withdrawals=[
691-
Withdrawal(
692-
index=1,
693-
validator=0,
694-
address=to_address(0x100A),
695-
amount=10**9,
696-
)
697-
],
698-
exception="invalid withdrawal index",
699-
)
700-
block_1_valid = Block(
701-
# Correct start index
702-
txs=[
703-
Transaction(
704-
nonce=0,
705-
gas_limit=100000,
706-
to=to_address(0x100B),
707-
)
708-
],
709-
withdrawals=[
710-
Withdrawal(
711-
index=0,
712-
validator=0,
713-
address=to_address(0x100B),
714-
amount=10**9,
715-
)
716-
],
717-
)
718-
719-
block_2_invalid = Block(
720-
# Skip withdrawal index
721-
txs=[
722-
Transaction(
723-
nonce=1,
724-
gas_limit=100000,
725-
to=to_address(0x200A),
726-
)
727-
],
728-
withdrawals=[
729-
Withdrawal(
730-
index=2,
731-
validator=0,
732-
address=to_address(0x200A),
733-
amount=10**9,
734-
)
735-
],
736-
exception="invalid withdrawal index",
737-
)
738-
block_2_valid = Block(
739-
# Correct sequential withdrawal index
740-
txs=[
741-
Transaction(
742-
nonce=1,
743-
gas_limit=100000,
744-
to=to_address(0x200B),
745-
)
746-
],
747-
withdrawals=[
748-
Withdrawal(
749-
index=1,
750-
validator=0,
751-
address=to_address(0x200B),
752-
amount=10**9,
753-
)
754-
],
755-
)
756-
757-
post = {
758-
to_address(0x100A): Account(
759-
balance=None,
760-
storage=None,
761-
),
762-
to_address(0x100B): Account(
763-
balance=10**9,
764-
storage={
765-
0x1: 0x1,
766-
},
767-
),
768-
to_address(0x200A): Account(
769-
balance=None,
770-
storage=None,
771-
),
772-
to_address(0x200B): Account(
773-
balance=10**9,
774-
storage={
775-
0x2: 0x1,
776-
},
777-
),
778-
}
779-
780-
yield BlockchainTest(
781-
pre=pre,
782-
post=post,
783-
blocks=[block_1_invalid, block_1_valid, block_2_valid],
784-
)
785-
786-
yield BlockchainTest(
787-
pre=pre,
788-
post=post,
789-
blocks=[
790-
block_1_valid,
791-
block_2_invalid,
792-
block_2_valid,
793-
],
794-
)
795-
796-
797-
# @test_from(WITHDRAWALS_FORK)
798-
# def test_withdrawals_inner_skip_index(_):
799-
# # TODO: This is not possible yet I think
800-
# pass

0 commit comments

Comments
 (0)