3 Star 1 Fork 0

Gitee 极速下载/stellar-core

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/stellar/stellar-core
克隆/下载
hash-xdrs.sh 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
Brett Boston 提交于 2024-03-23 06:07 +08:00 . Add new time sliced overlay survey
#!/bin/bash
#
# This file generates a C++ file which contains (filename, hash) pairs for XDR
# files included in the build. These are included in the stellar-core build to
# be checked against similar hashes produced by xdrgen when it is compiling XDR
# definitions for Rust code.
#
# The goal is to detect the (unfortunately easy) condition of C++ and Rust code
# communicating with each other using different XDR definitions.
set -o errexit
set -o pipefail
if [ ! -d $1/xdr ]; then
echo "usage: $0 XDR_PROTOCOL_DIR"
exit 1
fi
cat <<EOF
// DO NOT EDIT: this file is automatically generated from $0
#include <string>
#include <vector>
#include <filesystem>
namespace stellar {
extern const std::vector<std::pair<std::filesystem::path, std::string>> XDR_FILES_SHA256 = {
EOF
# Hashes to ignore
IGNORE="Stellar-internal\|Stellar-overlay\|Stellar-contract-spec\|Stellar-contract-meta\|Stellar-contract-env-meta"
sha256sum -b $1/xdr/*.x | grep -v "${IGNORE}" | perl -pe 's/([a-f0-9]+)[ \*]+(.*)/{"$2", "$1"},/'
# Add empty entries for the 5 skipped files
echo '{"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}};'
echo '}'
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/stellar-core.git
git@gitee.com:mirrors/stellar-core.git
mirrors
stellar-core
stellar-core
master

搜索帮助