You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2022/04/10 06:25:15 UTC
[incubator-tuweni] branch main updated: Output validator address when outputting validators
This is an automated email from the ASF dual-hosted git repository.
toulmean pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
The following commit(s) were added to refs/heads/main by this push:
new 8feedb27 Output validator address when outputting validators
new eda2eb7f Merge pull request #397 from atoulme/add_validator_address
8feedb27 is described below
commit 8feedb27e1e389455aecc1ec585ad8c9a4f4d971
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Tue Apr 5 20:29:46 2022 -0700
Output validator address when outputting validators
---
genesis/src/main/kotlin/org/apache/tuweni/genesis/Quorum.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/genesis/src/main/kotlin/org/apache/tuweni/genesis/Quorum.kt b/genesis/src/main/kotlin/org/apache/tuweni/genesis/Quorum.kt
index 6063574b..4611ae09 100644
--- a/genesis/src/main/kotlin/org/apache/tuweni/genesis/Quorum.kt
+++ b/genesis/src/main/kotlin/org/apache/tuweni/genesis/Quorum.kt
@@ -28,7 +28,7 @@ import org.apache.tuweni.units.bigints.UInt256
class QuorumConfig(val genesis: Genesis, val validators: List<SECP256K1.KeyPair>, val allocations: List<Allocation>) {
companion object {
- val validatorHeader = "Public key,Secret key\n"
+ val validatorHeader = "Address,Public key,Secret key\n"
val header = "User,Public key,Address,Secret key\n"
fun generate(
@@ -102,7 +102,7 @@ class QuorumConfig(val genesis: Genesis, val validators: List<SECP256K1.KeyPair>
fun validatorsToCsv(): String {
return validatorHeader + validators.map {
- it.publicKey().toHexString() + "," + it.secretKey().bytes().toHexString()
+ Address.fromPublicKey(it.publicKey()).toHexString() + "," + it.publicKey().toHexString() + "," + it.secretKey().bytes().toHexString()
}.joinToString("\n")
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org