mirror of
https://github.com/Xahau/xahaud.git
synced 2026-04-29 15:37:46 +00:00
Compare commits
22 Commits
coverage
...
switch-sta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b350df0eda | ||
|
|
ef7a03ec10 | ||
|
|
6eb6c41ec6 | ||
|
|
9651f68b2e | ||
|
|
f1f44ae232 | ||
|
|
c461dd9055 | ||
|
|
73cf6d34cd | ||
|
|
ea92477d21 | ||
|
|
e4c7893bf0 | ||
|
|
ad9d6a6eb3 | ||
|
|
dbbffd917e | ||
|
|
1d7c7e5603 | ||
|
|
52843e2321 | ||
|
|
6aabbc940b | ||
|
|
3111ecea52 | ||
|
|
1008508c9b | ||
|
|
58e278289b | ||
|
|
d3d24f781b | ||
|
|
131d659032 | ||
|
|
503dee619a | ||
|
|
1703d96a48 | ||
|
|
b960026701 |
26
.github/workflows/xahau-ga-nix.yml
vendored
26
.github/workflows/xahau-ga-nix.yml
vendored
@@ -230,6 +230,9 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
needs: matrix-setup
|
needs: matrix-setup
|
||||||
runs-on: ${{ fromJSON(matrix.runs_on) }}
|
runs-on: ${{ fromJSON(matrix.runs_on) }}
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
contents: read
|
||||||
container:
|
container:
|
||||||
image: ubuntu:24.04
|
image: ubuntu:24.04
|
||||||
volumes:
|
volumes:
|
||||||
@@ -332,7 +335,7 @@ jobs:
|
|||||||
# Install gcovr for coverage jobs
|
# Install gcovr for coverage jobs
|
||||||
if [ "${{ matrix.job_type }}" = "coverage" ]; then
|
if [ "${{ matrix.job_type }}" = "coverage" ]; then
|
||||||
pipx install "gcovr>=7,<9"
|
pipx install "gcovr>=7,<9"
|
||||||
apt-get install -y lcov
|
apt-get install -y curl lcov
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check environment
|
- name: Check environment
|
||||||
@@ -407,7 +410,8 @@ jobs:
|
|||||||
cache_version: ${{ env.CACHE_VERSION }}
|
cache_version: ${{ env.CACHE_VERSION }}
|
||||||
main_branch: ${{ env.MAIN_BRANCH_NAME }}
|
main_branch: ${{ env.MAIN_BRANCH_NAME }}
|
||||||
stdlib: ${{ matrix.stdlib }}
|
stdlib: ${{ matrix.stdlib }}
|
||||||
cmake-args: '-Dcoverage=ON -Dcoverage_format=xml -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_CXX_FLAGS="-O0" -DCMAKE_C_FLAGS="-O0"'
|
# Coverage builds are slower due to instrumentation; use fewer parallel jobs to avoid flakiness
|
||||||
|
cmake-args: '-Dcoverage=ON -Dcoverage_format=xml -Dcoverage_test_parallelism=$(($(nproc)/2)) -DCODE_COVERAGE_VERBOSE=ON -DCMAKE_CXX_FLAGS="-O0" -DCMAKE_C_FLAGS="-O0"'
|
||||||
cmake-target: 'coverage'
|
cmake-target: 'coverage'
|
||||||
ccache_max_size: '100G'
|
ccache_max_size: '100G'
|
||||||
|
|
||||||
@@ -452,15 +456,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload coverage report
|
- name: Upload coverage report
|
||||||
if: matrix.job_type == 'coverage'
|
if: matrix.job_type == 'coverage'
|
||||||
uses: wandalen/wretry.action/main@v3
|
uses: codecov/codecov-action@v5
|
||||||
with:
|
with:
|
||||||
action: codecov/codecov-action@v4.3.0
|
files: coverage.xml
|
||||||
with: |
|
fail_ci_if_error: true
|
||||||
files: coverage.xml
|
disable_search: true
|
||||||
fail_ci_if_error: true
|
verbose: true
|
||||||
disable_search: true
|
plugins: noop
|
||||||
verbose: true
|
use_oidc: true
|
||||||
plugin: noop
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
attempt_limit: 5
|
|
||||||
attempt_delay: 210000 # in milliseconds
|
|
||||||
|
|||||||
@@ -140,8 +140,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
|||||||
bool skipTests = false,
|
bool skipTests = false,
|
||||||
bool const testFlag = false,
|
bool const testFlag = false,
|
||||||
bool const badNetID = false,
|
bool const badNetID = false,
|
||||||
uint32_t const expectedOwnerCount =
|
uint32_t const expectedOwnerCount = 14 /** case for testFlag=false */)
|
||||||
10 /** testFlag ? 10 : 14 (default) */)
|
|
||||||
{
|
{
|
||||||
using namespace jtx;
|
using namespace jtx;
|
||||||
|
|
||||||
@@ -250,9 +249,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
|||||||
genesisAccRoot->getFieldAmount(sfBalance) ==
|
genesisAccRoot->getFieldAmount(sfBalance) ==
|
||||||
XahauGenesis::GenesisAmount);
|
XahauGenesis::GenesisAmount);
|
||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
genesisAccRoot->getFieldU32(sfOwnerCount) == !testFlag
|
genesisAccRoot->getFieldU32(sfOwnerCount) == expectedOwnerCount);
|
||||||
? expectedOwnerCount
|
|
||||||
: 14);
|
|
||||||
|
|
||||||
// ensure the definitions are correctly set
|
// ensure the definitions are correctly set
|
||||||
{
|
{
|
||||||
@@ -595,7 +592,8 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
|||||||
false,
|
false,
|
||||||
true,
|
true,
|
||||||
{},
|
{},
|
||||||
3 /* IRR,IRD,IMC */ + members.size() + tables.size());
|
2 /*Hook objects *2 */ + 3 /* IRR,IRD,IMC HookStates */ +
|
||||||
|
members.size());
|
||||||
|
|
||||||
env.close();
|
env.close();
|
||||||
env.close();
|
env.close();
|
||||||
@@ -2327,7 +2325,7 @@ struct XahauGenesis_test : public beast::unit_test::suite
|
|||||||
{
|
{
|
||||||
BEAST_EXPECT(
|
BEAST_EXPECT(
|
||||||
root->getFieldU32(sfOwnerCount) ==
|
root->getFieldU32(sfOwnerCount) ==
|
||||||
mc * 2 + 2 + paramsCount);
|
(mc * 2 + 2 + paramsCount));
|
||||||
BEAST_EXPECT(root->getFieldU32(sfFlags) & lsfDisableMaster);
|
BEAST_EXPECT(root->getFieldU32(sfFlags) & lsfDisableMaster);
|
||||||
BEAST_EXPECT(root->getAccountID(sfRegularKey) == noAccount());
|
BEAST_EXPECT(root->getAccountID(sfRegularKey) == noAccount());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2730,26 +2730,23 @@ DEFINE_HOOK_FUNCTION(
|
|||||||
|
|
||||||
return serialize_keylet(kl, memory, write_ptr, write_len);
|
return serialize_keylet(kl, memory, write_ptr, write_len);
|
||||||
}
|
}
|
||||||
|
// These keylet types are not yet implemented. Their
|
||||||
|
// corresponding amendments are not yet supported on the
|
||||||
|
// network. Each case needs a full implementation (see
|
||||||
|
// above cases for reference) before its amendment can be
|
||||||
|
// enabled.
|
||||||
|
// featureXChainBridge
|
||||||
case keylet_code::BRIDGE:
|
case keylet_code::BRIDGE:
|
||||||
case keylet_code::XCHAIN_OWNED_CLAIM_ID:
|
case keylet_code::XCHAIN_OWNED_CLAIM_ID:
|
||||||
case keylet_code::XCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID: {
|
case keylet_code::XCHAIN_OWNED_CREATE_ACCOUNT_CLAIM_ID:
|
||||||
if (!applyCtx.view().rules().enabled(featureXChainBridge))
|
// featureMPTokensV1
|
||||||
return INVALID_ARGUMENT;
|
|
||||||
}
|
|
||||||
case keylet_code::MPTOKEN_ISSUANCE:
|
case keylet_code::MPTOKEN_ISSUANCE:
|
||||||
case keylet_code::MPTOKEN: {
|
case keylet_code::MPTOKEN:
|
||||||
if (!applyCtx.view().rules().enabled(featureMPTokensV1))
|
// featureCredentials
|
||||||
return INVALID_ARGUMENT;
|
case keylet_code::CREDENTIAL:
|
||||||
}
|
// featurePermissionedDomains
|
||||||
case keylet_code::CREDENTIAL: {
|
case keylet_code::PERMISSIONED_DOMAIN:
|
||||||
if (!applyCtx.view().rules().enabled(featureCredentials))
|
return INVALID_ARGUMENT;
|
||||||
return INVALID_ARGUMENT;
|
|
||||||
}
|
|
||||||
case keylet_code::PERMISSIONED_DOMAIN: {
|
|
||||||
if (!applyCtx.view().rules().enabled(
|
|
||||||
featurePermissionedDomains))
|
|
||||||
return INVALID_ARGUMENT;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (std::exception& e)
|
catch (std::exception& e)
|
||||||
|
|||||||
Reference in New Issue
Block a user