代码拉取完成,页面将自动刷新
#!/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 '}'
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。