Skip to content

Commit

Permalink
Fix address network override via env var (#12590)
Browse files Browse the repository at this point in the history
Default address.CurrentNetwork was changed to mainnet. As a result if
`LOTUS_USE_TEST_ADDRESSES` is set we need to explicitly use testnet
address.
  • Loading branch information
masih authored and rjan90 committed Oct 14, 2024
1 parent a88993c commit 4158424
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/buildconstants/params_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,13 @@ var PropagationDelaySecs = uint64(10)
var EquivocationDelaySecs = uint64(2)

func init() {
var addrNetwork address.Network
if os.Getenv("LOTUS_USE_TEST_ADDRESSES") != "1" {
SetAddressNetwork(address.Mainnet)
addrNetwork = address.Mainnet
} else {
addrNetwork = address.Testnet
}
SetAddressNetwork(addrNetwork)

if os.Getenv("LOTUS_DISABLE_TUKTUK") == "1" {
UpgradeTuktukHeight = math.MaxInt64 - 1
Expand Down

0 comments on commit 4158424

Please sign in to comment.