vechain / thor

A general purpose blockchain highly compatible with Ethereum's ecosystem
GNU Lesser General Public License v3.0
796 stars 247 forks source link

feat: allow injection of master key via stdin #772

Closed darrenvechain closed 3 months ago

darrenvechain commented 3 months ago

Description

allow injection of master key via stdin

Type of change

How Has This Been Tested?

Run:

echo "842497a1c69577f4be27ae2ec64751a0c0165f9011e6c27570e21f48c4af9d50" | ./bin/thor --network=main --master-key-stdin

Checklist:

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.

Project coverage is 62.53%. Comparing base (3d7ab12) to head (fead0f4). Report is 1 commits behind head on master.

Files Patch % Lines
cmd/thor/utils.go 0.00% 30 Missing :warning:
cmd/thor/main.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #772 +/- ## ========================================== - Coverage 62.58% 62.53% -0.05% ========================================== Files 199 199 Lines 18098 18142 +44 ========================================== + Hits 11326 11346 +20 - Misses 5690 5714 +24 Partials 1082 1082 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

libotony commented 3 months ago

@darrenvechain Made a small improvement, use the existing password input func when it's in terminal mode, check this commit