* Update spl-token to v2.0 (#11884)
* Update account-decoder to spl-token v2.0
* Update transaction-status to spl-token v2.0
* Update rpc to spl-token v2.0
* Update getTokenSupply to pull from Mint directly
* Fixup to spl-token v2.0.1
(cherry picked from commit 76be36c9ce
)
# Conflicts:
# Cargo.lock
# account-decoder/Cargo.toml
# core/Cargo.toml
# core/src/rpc.rs
# transaction-status/Cargo.toml
* Fix non-Cargo.lock conflicts
* Limited Deserialize isn't limiting anything (#10952)
* Add failing test
* Use deserialize_from to enable limit
* Cargo.lock
* chore(deps): bump bincode from 1.2.1 to 1.3.1 (#10867)
* chore(deps): bump bincode from 1.2.1 to 1.3.1
Bumps [bincode](https://github.com/servo/bincode) from 1.2.1 to 1.3.1.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/commits)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* [auto-commit] Update all Cargo lock files
* Switch from deprecated method
* Add options to maintain behavior with bincode::options()
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: dependabot-buildkite <dependabot-buildkite@noreply.solana.com>
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
use crate::bank_forks::CompressionType;
|
||||
use crate::hardened_unpack::{unpack_snapshot, UnpackError};
|
||||
use crate::snapshot_package::AccountsPackage;
|
||||
use bincode::serialize_into;
|
||||
use crate::{
|
||||
bank_forks::CompressionType,
|
||||
hardened_unpack::{unpack_snapshot, UnpackError},
|
||||
snapshot_package::AccountsPackage,
|
||||
};
|
||||
use bincode::{config::Options, serialize_into};
|
||||
use bzip2::bufread::BzDecoder;
|
||||
use flate2::read::GzDecoder;
|
||||
use fs_extra::dir::CopyOptions;
|
||||
@@ -721,8 +723,10 @@ where
|
||||
|
||||
info!("Loading bank from {:?}", &root_paths.snapshot_file_path);
|
||||
let bank = deserialize_snapshot_data_file(&root_paths.snapshot_file_path, |mut stream| {
|
||||
let mut bank: Bank = bincode::config()
|
||||
.limit(MAX_SNAPSHOT_DATA_FILE_SIZE)
|
||||
let mut bank: Bank = bincode::options()
|
||||
.with_limit(MAX_SNAPSHOT_DATA_FILE_SIZE)
|
||||
.with_fixint_encoding()
|
||||
.allow_trailing_bytes()
|
||||
.deserialize_from(&mut stream)?;
|
||||
|
||||
info!("Rebuilding accounts...");
|
||||
@@ -757,8 +761,10 @@ where
|
||||
let status_cache_path = unpacked_snapshots_dir.join(SNAPSHOT_STATUS_CACHE_FILE_NAME);
|
||||
let slot_deltas = deserialize_snapshot_data_file(&status_cache_path, |stream| {
|
||||
info!("Rebuilding status cache...");
|
||||
let slot_deltas: Vec<BankSlotDelta> = bincode::config()
|
||||
.limit(MAX_SNAPSHOT_DATA_FILE_SIZE)
|
||||
let slot_deltas: Vec<BankSlotDelta> = bincode::options()
|
||||
.with_limit(MAX_SNAPSHOT_DATA_FILE_SIZE)
|
||||
.with_fixint_encoding()
|
||||
.allow_trailing_bytes()
|
||||
.deserialize_from(stream)?;
|
||||
Ok(slot_deltas)
|
||||
})?;
|
||||
|
Reference in New Issue
Block a user