Skip to content

Commit 2516642

Browse files
committed
Merge branch 'feat-2.0' of github.com:casper-network/casper-node into rustSDK-feat-2.0
# Conflicts: # Makefile # types/src/transaction/transaction_v1/transaction_v1_builder.rs
2 parents db10abd + e6456b7 commit 2516642

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3983
-1350
lines changed

Cargo.lock

+101-101
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ lint-smart-contracts:
159159

160160
.PHONY: audit-rs
161161
audit-rs:
162-
$(CARGO) audit --ignore RUSTSEC-2024-0344 --ignore RUSTSEC-2024-0367
162+
$(CARGO) audit --ignore RUSTSEC-2024-0344 --ignore RUSTSEC-2024-0367 --ignore RUSTSEC-2024-0371
163163

164164
.PHONY: audit-as
165165
audit-as:

binary_port/src/binary_response.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use casper_types::{
66
use crate::{
77
binary_response_header::BinaryResponseHeader,
88
error_code::ErrorCode,
9-
payload_type::{PayloadEntity, PayloadType},
9+
response_type::{PayloadEntity, ResponseType},
1010
};
1111

1212
#[cfg(test)]
@@ -40,7 +40,7 @@ impl BinaryResponse {
4040

4141
/// Creates new binary response from raw bytes.
4242
pub fn from_raw_bytes(
43-
payload_type: PayloadType,
43+
payload_type: ResponseType,
4444
payload: Vec<u8>,
4545
protocol_version: ProtocolVersion,
4646
) -> Self {
@@ -59,7 +59,7 @@ impl BinaryResponse {
5959
BinaryResponse::new_error(ErrorCode::InternalError, protocol_version),
6060
|payload| BinaryResponse {
6161
payload,
62-
header: BinaryResponseHeader::new(Some(V::PAYLOAD_TYPE), protocol_version),
62+
header: BinaryResponseHeader::new(Some(V::RESPONSE_TYPE), protocol_version),
6363
},
6464
)
6565
}

binary_port/src/binary_response_and_request.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use casper_types::{
55

66
use crate::{
77
binary_response::BinaryResponse, original_request_context::OriginalRequestContext,
8-
payload_type::PayloadEntity, PayloadType,
8+
response_type::PayloadEntity, ResponseType,
99
};
1010

1111
use crate::record_id::RecordId;
@@ -37,14 +37,14 @@ impl BinaryResponseAndRequest {
3737
}
3838
}
3939

40-
/// Returns a new binary response with specified data and no original request.
40+
/// Returns a new binary response with specified data and no original request.
4141
pub fn new_test_response<A: PayloadEntity + ToBytes>(
4242
record_id: RecordId,
4343
data: &A,
4444
protocol_version: ProtocolVersion,
4545
) -> BinaryResponseAndRequest {
4646
let response = BinaryResponse::from_raw_bytes(
47-
PayloadType::from_record_id(record_id, false),
47+
ResponseType::from_record_id(record_id, false),
4848
data.to_bytes().unwrap(),
4949
protocol_version,
5050
);
@@ -58,7 +58,7 @@ impl BinaryResponseAndRequest {
5858
protocol_version: ProtocolVersion,
5959
) -> BinaryResponseAndRequest {
6060
let response = BinaryResponse::from_raw_bytes(
61-
PayloadType::from_record_id(record_id, true),
61+
ResponseType::from_record_id(record_id, true),
6262
bincode::serialize(data).unwrap(),
6363
protocol_version,
6464
);

binary_port/src/binary_response_header.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{error_code::ErrorCode, payload_type::PayloadType};
1+
use crate::{error_code::ErrorCode, response_type::ResponseType};
22
use casper_types::{
33
bytesrepr::{self, FromBytes, ToBytes},
44
ProtocolVersion,
@@ -19,7 +19,10 @@ pub struct BinaryResponseHeader {
1919

2020
impl BinaryResponseHeader {
2121
/// Creates new binary response header representing success.
22-
pub fn new(returned_data_type: Option<PayloadType>, protocol_version: ProtocolVersion) -> Self {
22+
pub fn new(
23+
returned_data_type: Option<ResponseType>,
24+
protocol_version: ProtocolVersion,
25+
) -> Self {
2326
Self {
2427
protocol_version,
2528
error: ErrorCode::NoError as u16,

0 commit comments

Comments
 (0)