-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3305 from keep-network/print-addresses
Print addresses of operators selected to a signing group To make the debugging of problems easier, we now print the addresses of operators selected to ECDSA and Beacon signing groups.
- Loading branch information
Showing
9 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package chain | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/keep-network/keep-core/pkg/internal/testutils" | ||
) | ||
|
||
func TestAddressesToString(t *testing.T) { | ||
var tests = map[string]struct { | ||
addresses Addresses | ||
expectedString string | ||
}{ | ||
"empty addresses": { | ||
addresses: Addresses{}, | ||
expectedString: "[]", | ||
}, | ||
"one address": { | ||
addresses: Addresses{"0x123"}, | ||
expectedString: "[1: 0x123]", | ||
}, | ||
"two addresses": { | ||
addresses: Addresses{"0x123", "0x234"}, | ||
expectedString: "[1: 0x123, 2: 0x234]", | ||
}, | ||
"three addresses": { | ||
addresses: Addresses{"0x123", "0x234", "0x345"}, | ||
expectedString: "[1: 0x123, 2: 0x234, 3: 0x345]", | ||
}, | ||
} | ||
|
||
for testName, test := range tests { | ||
t.Run(testName, func(t *testing.T) { | ||
actualString := test.addresses.String() | ||
testutils.AssertStringsEqual( | ||
t, | ||
"ToString() result", | ||
test.expectedString, | ||
actualString, | ||
) | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters