Skip to content

Commit

Permalink
network gravity removed
Browse files Browse the repository at this point in the history
  • Loading branch information
pseusys committed Sep 7, 2023
1 parent f79b68b commit 6355916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions caerulean/whirlpool/sources/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"html"
"main/m/v2/generated"
"net/http"
"strconv"
"time"

"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -41,11 +40,10 @@ func init() {
if err != nil {
logrus.Fatalln("error generating RSA node key:", err)
}
nodeOwnerKeyData, err := RandByteStr(OWNER_KEY_LENGTH)
NODE_OWNER_KEY, err = RandByteStr(OWNER_KEY_LENGTH)
if err != nil {
logrus.Fatalln("error generating node owner key:", err)
}
NODE_OWNER_KEY = nodeOwnerKeyData + ":" + strconv.Itoa(GRAVITY)
}

func public(w http.ResponseWriter, _ *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions viridian/algae/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
_EXECUTABLE_NAME = "algae.run"
_MAX_LINE_LEN = 180

_OWNER_KEY_REGEX = compile(r"\"Node API setup, node owner key: (\S{32}:(\d))\"")
_OWNER_KEY_REGEX = compile(r"\"Node API setup, node owner key: (\S{32})\"")

logger = getLogger(__name__)

Expand Down Expand Up @@ -86,7 +86,7 @@ def test() -> int:

owner_key = search(_OWNER_KEY_REGEX, caerulean_cnt.logs().decode())
if owner_key is not None:
logger.info(f"Node owner key extracted: {Fore.BLUE}{Style.BRIGHT}{owner_key.group(1)}{Style.RESET_ALL}, gravity: {owner_key.group(2)}.")
logger.info(f"Node owner key extracted: {Fore.BLUE}{Style.BRIGHT}{owner_key.group(1)}{Style.RESET_ALL}")
else:
logger.critical("Node owner key not found!")
caerulean_cnt.remove(force=True)
Expand Down

0 comments on commit 6355916

Please sign in to comment.