-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into topics-in-waku-messages-request
- Loading branch information
Showing
145 changed files
with
7,924 additions
and
3,958 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.39.5 | ||
0.39.9 |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build !nimbus | ||
|
||
// TODO: Make independent version for Nimbus | ||
|
||
package account | ||
|
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,49 @@ | ||
// +build nimbus | ||
|
||
package account | ||
|
||
import ( | ||
"io/ioutil" | ||
"os" | ||
|
||
"github.com/ethereum/go-ethereum/accounts" | ||
"github.com/ethereum/go-ethereum/accounts/keystore" | ||
|
||
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth" | ||
// nimbusbridge "github.com/status-im/status-go/eth-node/bridge/nimbus" | ||
"github.com/status-im/status-go/eth-node/types" | ||
) | ||
|
||
// makeAccountManager creates ethereum accounts.Manager with single disk backend and lightweight kdf. | ||
// If keydir is empty new temporary directory with go-ethereum-keystore will be intialized. | ||
func makeAccountManager(keydir string) (manager *accounts.Manager, err error) { | ||
if keydir == "" { | ||
// There is no datadir. | ||
keydir, err = ioutil.TempDir("", "nimbus-keystore") | ||
} | ||
if err != nil { | ||
return nil, err | ||
} | ||
if err := os.MkdirAll(keydir, 0700); err != nil { | ||
return nil, err | ||
} | ||
config := accounts.Config{InsecureUnlockAllowed: false} | ||
return accounts.NewManager(&config, keystore.NewKeyStore(keydir, keystore.LightScryptN, keystore.LightScryptP)), nil | ||
} | ||
|
||
func makeKeyStore(manager *accounts.Manager) (types.KeyStore, error) { | ||
backends := manager.Backends(keystore.KeyStoreType) | ||
if len(backends) == 0 { | ||
return nil, ErrAccountKeyStoreMissing | ||
} | ||
keyStore, ok := backends[0].(*keystore.KeyStore) | ||
if !ok { | ||
return nil, ErrAccountKeyStoreMissing | ||
} | ||
|
||
return gethbridge.WrapKeyStore(keyStore), nil | ||
} | ||
|
||
// func makeKeyStore(_ string) (types.KeyStore, error) { | ||
// return nimbusbridge.WrapKeyStore(), nil | ||
// } |
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
Oops, something went wrong.