mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-31 02:50:24 +00:00
Merge branch 'develop' into ximinez/online-delete-gaps
This commit is contained in:
13
flake.lock
generated
13
flake.lock
generated
@@ -2,17 +2,18 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1780749050,
|
||||
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=",
|
||||
"lastModified": 1781173989,
|
||||
"narHash": "sha256-fnzKKPvS+oieI/pTzotA5tkoM47EB1NpaBcgk4R97hE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb",
|
||||
"rev": "8c91a71d13451abc40eb9dae8910f972f979852f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-custom-glibc": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "Nix related things for xrpld";
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
# nixpkgs snapshot (2020-06-30) that shipped glibc 2.31 as the primary
|
||||
# version — matches the system libc on Ubuntu 20.04 LTS. Imported
|
||||
# manually (flake = false) because this revision predates nixpkgs'
|
||||
|
||||
@@ -1,26 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
# conan is in the binary cache for Linux but not for Darwin, so on Darwin
|
||||
# it is always built from source — and its bundled test suite is unreliable
|
||||
# in the sandbox: `test_qbsprofile_rcflags` needs gcc (absent on Darwin, see
|
||||
# https://github.com/NixOS/nixpkgs/pull/528995) and the patch tests are
|
||||
# flaky from source. We only use conan as a build tool, so skip its tests on
|
||||
# Darwin. Scoped to the dev shell (not the CI env, which builds conan on
|
||||
# Linux from the cache). Drop once the fix reaches nixos-unstable and the
|
||||
# lock is bumped.
|
||||
pkgs_patched =
|
||||
if pkgs.stdenv.isDarwin then
|
||||
pkgs.extend (
|
||||
final: prev: {
|
||||
conan = prev.conan.overridePythonAttrs (_: {
|
||||
doCheck = false;
|
||||
});
|
||||
}
|
||||
)
|
||||
else
|
||||
pkgs;
|
||||
|
||||
inherit (import ./packages.nix { pkgs = pkgs_patched; }) commonPackages;
|
||||
inherit (import ./packages.nix { inherit pkgs; }) commonPackages;
|
||||
|
||||
# Supported compiler versions
|
||||
gccVersion = pkgs.lib.range 13 15;
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
#include <xrpl/resource/Disposition.h>
|
||||
#include <xrpl/resource/Fees.h>
|
||||
#include <xrpl/resource/Gossip.h>
|
||||
#include <xrpl/server/Handoff.h>
|
||||
#include <xrpl/server/LoadFeeTrack.h>
|
||||
#include <xrpl/server/NetworkOPs.h>
|
||||
#include <xrpl/shamap/SHAMapNodeID.h>
|
||||
@@ -68,6 +67,7 @@
|
||||
#include <boost/asio/bind_executor.hpp>
|
||||
#include <boost/asio/buffer.hpp>
|
||||
#include <boost/asio/completion_condition.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/strand.hpp>
|
||||
@@ -392,13 +392,15 @@ PeerImp::removeTxQueue(uint256 const& hash)
|
||||
void
|
||||
PeerImp::charge(Resource::Charge const& fee, std::string const& context)
|
||||
{
|
||||
if ((usage_.charge(fee, context) == Resource::Disposition::Drop) &&
|
||||
usage_.disconnect(pJournal_) && strand_.running_in_this_thread())
|
||||
{
|
||||
// Sever the connection
|
||||
overlay_.incPeerDisconnectCharges();
|
||||
fail("charge: Resources");
|
||||
}
|
||||
dispatch(strand_, [this, self = shared_from_this(), fee, context]() {
|
||||
if (usage_.charge(fee, context) == Resource::Disposition::Drop &&
|
||||
usage_.disconnect(pJournal_))
|
||||
{
|
||||
// Sever the connection.
|
||||
overlay_.incPeerDisconnectCharges();
|
||||
fail("charge: Resources");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user