diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-07-17 09:05:37 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-07-17 09:05:37 +0300 |
commit | 3ab8a99969ba7d7b384390b608eb9ad6f5a43752 (patch) | |
tree | b7973c2d9e55d09e0682ffb3454388dddc17252d /lib | |
parent | 868795114f1acfb34149c22a9957169005bfc20f (diff) | |
download | arching-kaos-tools-3ab8a99969ba7d7b384390b608eb9ad6f5a43752.tar.gz arching-kaos-tools-3ab8a99969ba7d7b384390b608eb9ad6f5a43752.tar.bz2 arching-kaos-tools-3ab8a99969ba7d7b384390b608eb9ad6f5a43752.zip |
ak zchain: --get-latest (removing ak-get-zlatest)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/_ak_config | 2 | ||||
-rwxr-xr-x | lib/_ak_zblock | 2 | ||||
-rwxr-xr-x | lib/_ak_zchain | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/lib/_ak_config b/lib/_ak_config index 0159453..f47a7c5 100755 --- a/lib/_ak_config +++ b/lib/_ak_config @@ -15,7 +15,7 @@ _ak_config_show(){ "genesis":"'$(cat $AK_WORKDIR/config/zgenesis)'", "gpg":"'$GPG_PUB_KEY'", "zchain":"'$(cat $AK_WORKDIR/config/zchain)'", - "zlatest":"'$(ak-get-zlatest)'" + "zlatest":"'$(ak zchain --get-latest)'" }'| jq; } diff --git a/lib/_ak_zblock b/lib/_ak_zblock index b2db633..78c1586 100755 --- a/lib/_ak_zblock +++ b/lib/_ak_zblock @@ -677,7 +677,7 @@ _ak_zblock_announce(){ curl \ --connect-timeout 3 \ --header 'Content-Type: application/json' \ - --data-raw '{"zblock":"'$(ak-get-zlatest)'"}' \ + --data-raw '{"zblock":"'$(_ak_zchain_get_latest)'"}' \ "http://127.0.0.1:8610/v0/announce/zblock" \ 2>/dev/null | jq -M -c > /dev/null if [ $? -ne 0 ] diff --git a/lib/_ak_zchain b/lib/_ak_zchain index 3776e49..c809b5d 100755 --- a/lib/_ak_zchain +++ b/lib/_ak_zchain @@ -231,6 +231,10 @@ _ak_zchain_crawl_remote_ipns(){ #ak enter -n $1 } +_ak_zchain_get_latest(){ + _ak_ipfs_files_stat /zlatest | head -n 1| tr -d '\n' +} + # _ak_zchain_announce(){} # PROGRAM="$(basename $0)" # printf '[%s]\n' "$PROGRAM" |