mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Recent updates in storage (#667)
* Fix error handling in Torrent.cpp, improve choosing peers for upload * Various improvements in storage daemon "get-pieces-info" Store "added at" Improve calculating up/down speed Improve TL protocol for future compatibility Remove empty directories on "--remove-files" Better windows support Debug logs in PeerActor More restrictions on TorrentInfo Bugfixes * Global speed limits for download and upload +bugfix * Reset download/upload speed on changing settings or completion * Exclude some system files in TorrentCreator
This commit is contained in:
parent
e3af63e6c0
commit
bb21f732fd
21 changed files with 974 additions and 213 deletions
|
@ -23,6 +23,8 @@
|
|||
#include "td/utils/optional.h"
|
||||
|
||||
#include "td/actor/actor.h"
|
||||
#include "TorrentInfo.h"
|
||||
#include "SpeedLimiter.h"
|
||||
|
||||
#include <map>
|
||||
#include <atomic>
|
||||
|
@ -100,6 +102,8 @@ struct PeerState {
|
|||
std::atomic_bool peer_state_ready_{false};
|
||||
std::atomic<State> peer_state_{State{false, false}};
|
||||
std::atomic_bool peer_online_{false};
|
||||
std::atomic_bool peer_online_set_{false};
|
||||
SpeedLimiters speed_limiters_;
|
||||
|
||||
struct Part {
|
||||
td::BufferSlice proof;
|
||||
|
@ -121,7 +125,7 @@ struct PeerState {
|
|||
|
||||
// Node -> Peer
|
||||
std::atomic_bool torrent_info_ready_{false};
|
||||
std::shared_ptr<td::BufferSlice> torrent_info_str_;
|
||||
std::shared_ptr<TorrentInfo> torrent_info_;
|
||||
std::function<void(td::BufferSlice)> torrent_info_response_callback_;
|
||||
|
||||
const td::actor::ActorId<> node;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue