diff --git a/domain/consensus/processes/dagtraversalmanager/window_test.go b/domain/consensus/processes/dagtraversalmanager/window_test.go index 6a13f01be..50b58d3dc 100644 --- a/domain/consensus/processes/dagtraversalmanager/window_test.go +++ b/domain/consensus/processes/dagtraversalmanager/window_test.go @@ -34,156 +34,12 @@ func TestBlueBlockWindow(t *testing.T) { expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, }, { - parents: []string{"C", "D"}, - id: "E", - expectedWindowWithGenesisPadding: []string{"C", "D", "B", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"C", "D"}, - id: "F", - expectedWindowWithGenesisPadding: []string{"C", "D", "B", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"A"}, - id: "G", - expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"G"}, - id: "H", - expectedWindowWithGenesisPadding: []string{"G", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"H", "F"}, - id: "I", - expectedWindowWithGenesisPadding: []string{"F", "C", "D", "B", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"I"}, - id: "J", - expectedWindowWithGenesisPadding: []string{"I", "F", "C", "D", "B", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"J"}, - id: "K", - expectedWindowWithGenesisPadding: []string{"J", "I", "F", "C", "D", "B", "A", "A", "A", "A"}, - }, - { - parents: []string{"K"}, - id: "L", - expectedWindowWithGenesisPadding: []string{"K", "J", "I", "F", "C", "D", "B", "A", "A", "A"}, - }, - { - parents: []string{"L"}, - id: "M", - expectedWindowWithGenesisPadding: []string{"L", "K", "J", "I", "F", "C", "D", "B", "A", "A"}, - }, - { - parents: []string{"M"}, - id: "N", - expectedWindowWithGenesisPadding: []string{"M", "L", "K", "J", "I", "F", "C", "D", "B", "A"}, - }, - { - parents: []string{"N"}, - id: "O", - expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "C", "D", "B"}, - }, - }, - "kaspa-testnet": { - { - parents: []string{"A"}, - id: "B", - expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"B"}, - id: "C", - expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"B"}, - id: "D", - expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"C", "D"}, - id: "E", - expectedWindowWithGenesisPadding: []string{"C", "D", "B", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"C", "D"}, - id: "F", - expectedWindowWithGenesisPadding: []string{"C", "D", "B", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"A"}, - id: "G", - expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"G"}, - id: "H", - expectedWindowWithGenesisPadding: []string{"G", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"H", "F"}, - id: "I", - expectedWindowWithGenesisPadding: []string{"F", "C", "D", "B", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"I"}, - id: "J", - expectedWindowWithGenesisPadding: []string{"I", "F", "C", "D", "B", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"J"}, - id: "K", - expectedWindowWithGenesisPadding: []string{"J", "I", "F", "C", "D", "B", "A", "A", "A", "A"}, - }, - { - parents: []string{"K"}, - id: "L", - expectedWindowWithGenesisPadding: []string{"K", "J", "I", "F", "C", "D", "B", "A", "A", "A"}, - }, - { - parents: []string{"L"}, - id: "M", - expectedWindowWithGenesisPadding: []string{"L", "K", "J", "I", "F", "C", "D", "B", "A", "A"}, - }, - { - parents: []string{"M"}, - id: "N", - expectedWindowWithGenesisPadding: []string{"M", "L", "K", "J", "I", "F", "C", "D", "B", "A"}, - }, - { - parents: []string{"N"}, - id: "O", - expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "C", "D", "B"}, - }, - }, - "kaspa-devnet": { - { - parents: []string{"A"}, - id: "B", - expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"B"}, - id: "C", - expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"B"}, - id: "D", - expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, - }, - { - parents: []string{"C", "D"}, + parents: []string{"D", "C"}, id: "E", expectedWindowWithGenesisPadding: []string{"D", "C", "B", "A", "A", "A", "A", "A", "A", "A"}, }, { - parents: []string{"C", "D"}, + parents: []string{"D", "C"}, id: "F", expectedWindowWithGenesisPadding: []string{"D", "C", "B", "A", "A", "A", "A", "A", "A", "A"}, }, @@ -233,6 +89,150 @@ func TestBlueBlockWindow(t *testing.T) { expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "D", "C", "B"}, }, }, + "kaspa-testnet": { + { + parents: []string{"A"}, + id: "B", + expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"B"}, + id: "C", + expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"B"}, + id: "D", + expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"D", "C"}, + id: "E", + expectedWindowWithGenesisPadding: []string{"D", "C", "B", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"D", "C"}, + id: "F", + expectedWindowWithGenesisPadding: []string{"D", "C", "B", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"A"}, + id: "G", + expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"G"}, + id: "H", + expectedWindowWithGenesisPadding: []string{"G", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"H", "F"}, + id: "I", + expectedWindowWithGenesisPadding: []string{"F", "D", "C", "B", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"I"}, + id: "J", + expectedWindowWithGenesisPadding: []string{"I", "F", "D", "C", "B", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"J"}, + id: "K", + expectedWindowWithGenesisPadding: []string{"J", "I", "F", "D", "C", "B", "A", "A", "A", "A"}, + }, + { + parents: []string{"K"}, + id: "L", + expectedWindowWithGenesisPadding: []string{"K", "J", "I", "F", "D", "C", "B", "A", "A", "A"}, + }, + { + parents: []string{"L"}, + id: "M", + expectedWindowWithGenesisPadding: []string{"L", "K", "J", "I", "F", "D", "C", "B", "A", "A"}, + }, + { + parents: []string{"M"}, + id: "N", + expectedWindowWithGenesisPadding: []string{"M", "L", "K", "J", "I", "F", "D", "C", "B", "A"}, + }, + { + parents: []string{"N"}, + id: "O", + expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "D", "C", "B"}, + }, + }, + "kaspa-devnet": { + { + parents: []string{"A"}, + id: "B", + expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"B"}, + id: "C", + expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"B"}, + id: "D", + expectedWindowWithGenesisPadding: []string{"B", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"C", "D"}, + id: "E", + expectedWindowWithGenesisPadding: []string{"C", "D", "B", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"C", "D"}, + id: "F", + expectedWindowWithGenesisPadding: []string{"C", "D", "B", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"A"}, + id: "G", + expectedWindowWithGenesisPadding: []string{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"G"}, + id: "H", + expectedWindowWithGenesisPadding: []string{"G", "A", "A", "A", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"H", "F"}, + id: "I", + expectedWindowWithGenesisPadding: []string{"F", "C", "D", "B", "A", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"I"}, + id: "J", + expectedWindowWithGenesisPadding: []string{"I", "F", "C", "D", "B", "A", "A", "A", "A", "A"}, + }, + { + parents: []string{"J"}, + id: "K", + expectedWindowWithGenesisPadding: []string{"J", "I", "F", "C", "D", "B", "A", "A", "A", "A"}, + }, + { + parents: []string{"K"}, + id: "L", + expectedWindowWithGenesisPadding: []string{"K", "J", "I", "F", "C", "D", "B", "A", "A", "A"}, + }, + { + parents: []string{"L"}, + id: "M", + expectedWindowWithGenesisPadding: []string{"L", "K", "J", "I", "F", "C", "D", "B", "A", "A"}, + }, + { + parents: []string{"M"}, + id: "N", + expectedWindowWithGenesisPadding: []string{"M", "L", "K", "J", "I", "F", "C", "D", "B", "A"}, + }, + { + parents: []string{"N"}, + id: "O", + expectedWindowWithGenesisPadding: []string{"N", "M", "L", "K", "J", "I", "F", "C", "D", "B"}, + }, + }, "kaspa-simnet": { { parents: []string{"A"},