diff --git a/Makefile b/Makefile index 36fbbae810ff0b63b986a7451f374d91ff643c47..a2cf9828cc01e30957d0c910c10660e20985ba62 100644 --- a/Makefile +++ b/Makefile @@ -85,9 +85,6 @@ db-tools: cp libmdbx/mdbx_stat $(GOBIN) @echo "Run \"$(GOBIN)/mdbx_stat -h\" to get info about mdbx db file." -torrent_hashes_update: - ./cmd/downloader/auto_update.sh mainnet - test: $(GOTEST) --timeout 30m diff --git a/cmd/downloader/torrent_hashes_update.sh b/cmd/downloader/torrent_hashes_update.sh old mode 100644 new mode 100755 index 1b859cc1d61b0b8c1de69f5256db775d51fa0b9a..738a9b30e04acb6734ead140ee889dc37edbedb0 --- a/cmd/downloader/torrent_hashes_update.sh +++ b/cmd/downloader/torrent_hashes_update.sh @@ -1,17 +1,25 @@ #!/usr/bin/env bash -network=$1 -datadir=$2 +datadir=$1 +network=$2 +#git reset --hard +#git checkout devel +#git pull + +# clean +cd ./../erigon-snapshot git reset --hard -git checkout devel git pull +cd ../erigon + # it will return only .seg of 500K (because Erigon send to Downloader only such files) -go run -trimpath ./cmd/downloader torrent_hashes --datadir="$datadir" >./../erigon-snpshots/"$network".toml -cd ./../erigon-snapshots +go run -trimpath ./cmd/downloader torrent_hashes --datadir="$datadir" >./../erigon-snapshot/"$network".toml +cd ./../erigon-snapshot git add "$network".toml -git commit -m "cd: $network" +git commit -m "ci: $network" git push + # update Erigon submodule cd ./../erigon cd turbo/snapshotsync/snapshothashes/erigon-snapshots @@ -19,5 +27,5 @@ git checkout main git pull cd ../../../../ git add turbo/snapshotsync/snapshothashes/erigon-snapshots -git commit -m "cd: $network snapshots" +git commit -m "ci: $network snapshots" git push diff --git a/turbo/snapshotsync/snapshothashes/erigon-snapshots b/turbo/snapshotsync/snapshothashes/erigon-snapshots index 6facca34d829c2fe61ae56a5b2c069191dad649f..cf6e317aa616c2821bb922e383e027561aced193 160000 --- a/turbo/snapshotsync/snapshothashes/erigon-snapshots +++ b/turbo/snapshotsync/snapshothashes/erigon-snapshots @@ -1 +1 @@ -Subproject commit 6facca34d829c2fe61ae56a5b2c069191dad649f +Subproject commit cf6e317aa616c2821bb922e383e027561aced193