This repository was archived by the owner on Feb 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 10 files changed +24
-18
lines changed
Expand file tree Collapse file tree 10 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ name = "sawtooth-intkey-workload"
33version = " 0.1.0"
44authors = [" Intel Corporation" ]
55description = " Workload generator for Sawtooth Intkey"
6+ edition = ' 2021'
67
78[[bin ]]
89name = " intkey-workload"
Original file line number Diff line number Diff line change 1515 * ------------------------------------------------------------------------------
1616 */
1717
18+ use crate :: intkey_addresser:: IntKeyAddresser ;
19+ use crate :: intkey_iterator:: IntKeyPayload ;
1820use cbor:: GenericEncoder ;
1921use crypto:: digest:: Digest ;
2022use crypto:: sha2:: Sha512 ;
21- use intkey_addresser:: IntKeyAddresser ;
22- use intkey_iterator:: IntKeyPayload ;
2323use protobuf:: { Message , RepeatedField } ;
2424use rand:: prelude:: * ;
2525use sawtooth_sdk:: messages:: transaction:: { Transaction , TransactionHeader } ;
@@ -186,7 +186,7 @@ impl<'a> IntKeyTransformer<'a> {
186186#[ cfg( test) ]
187187mod tests {
188188 use super :: IntKeyTransformer ;
189- use intkey_iterator:: IntKeyIterator ;
189+ use crate :: intkey_iterator:: IntKeyIterator ;
190190 use protobuf:: Message ;
191191 use sawtooth_sdk:: messages:: transaction:: TransactionHeader ;
192192 use sawtooth_sdk:: signing;
Original file line number Diff line number Diff line change 1616name = " sawtooth_perf"
1717version = " 0.1.0"
1818authors = [" Intel Corporation" ]
19+ edition = ' 2021'
1920
2021[dependencies ]
2122sawtooth-sdk = " 0.3"
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ use sawtooth_sdk::messages::transaction::Transaction;
3131
3232use sawtooth_sdk:: signing;
3333
34- use source:: LengthDelimitedMessageSource ;
34+ use crate :: source:: LengthDelimitedMessageSource ;
3535
3636/// Generates signed batches from a stream of length-delimited transactions.
3737/// Constrains the batches to `max_batch_size` number of transactions per
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ use tokio_timer;
4242use sawtooth_sdk:: messages:: batch:: Batch ;
4343use sawtooth_sdk:: messages:: batch:: BatchList ;
4444
45- use batch_gen:: { BatchResult , BatchingError } ;
46- use batch_map:: BatchMap ;
47- use source:: LengthDelimitedMessageSource ;
48- use workload;
45+ use crate :: batch_gen:: { BatchResult , BatchingError } ;
46+ use crate :: batch_map:: BatchMap ;
47+ use crate :: source:: LengthDelimitedMessageSource ;
48+ use crate :: workload;
4949
5050/// Populates a channel from a stream of length-delimited batches.
5151/// Starts one workload submitter of the appropriate type (http, zmq)
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ use tokio_core::reactor::Handle;
4242
4343use sawtooth_sdk:: messages:: batch:: BatchList ;
4444
45- use batch_submit:: BatchListResult ;
46- use batch_submit:: BatchReadingError ;
45+ use crate :: batch_submit:: BatchListResult ;
46+ use crate :: batch_submit:: BatchReadingError ;
4747
48- use batch_map:: BatchMap ;
48+ use crate :: batch_map:: BatchMap ;
4949
5050#[ allow( clippy:: enum_variant_names) ]
5151#[ derive( Debug ) ]
Original file line number Diff line number Diff line change 1515[package ]
1616name = " sawtooth_workload"
1717version = " 0.1.0"
18+ edition = ' 2021'
1819
1920[dependencies ]
2021sawtooth-sdk = " 0.3"
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ version = "0.1.0"
1818build = " build.rs"
1919authors = [" Intel Corporation" ]
2020description = " Workload generator for Sawtooth Smallbank"
21+ edition = ' 2021'
2122
2223[dependencies ]
2324sawtooth-sdk = " 0.3"
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ use self::yaml_rust::YamlEmitter;
3636use self :: yaml_rust:: YamlLoader ;
3737use rand:: prelude:: * ;
3838
39- use protos:: smallbank;
40- use protos:: smallbank:: SmallbankTransactionPayload ;
41- use protos:: smallbank:: SmallbankTransactionPayload_PayloadType as SBPayloadType ;
39+ use crate :: protos:: smallbank;
40+ use crate :: protos:: smallbank:: SmallbankTransactionPayload ;
41+ use crate :: protos:: smallbank:: SmallbankTransactionPayload_PayloadType as SBPayloadType ;
4242
4343use protobuf;
4444use protobuf:: Message ;
Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ use protobuf::Message;
2929use sawtooth_sdk:: messages:: transaction:: { Transaction , TransactionHeader } ;
3030use sawtooth_sdk:: signing;
3131
32- use playlist:: bytes_to_hex_str;
33- use playlist:: make_addresses;
34- use protos:: smallbank:: { SmallbankTransactionPayload , SmallbankTransactionPayload_PayloadType } ;
32+ use crate :: playlist:: bytes_to_hex_str;
33+ use crate :: playlist:: make_addresses;
34+ use crate :: protos:: smallbank:: {
35+ SmallbankTransactionPayload , SmallbankTransactionPayload_PayloadType ,
36+ } ;
3537
3638/// Transforms SmallbankTransactionPayloads into Sawtooth Transactions.
3739pub struct SBPayloadTransformer < ' a > {
@@ -171,7 +173,7 @@ mod tests {
171173 use sawtooth_sdk:: messages:: transaction:: TransactionHeader ;
172174 use sawtooth_sdk:: signing;
173175
174- use playlist:: SmallbankGeneratingIter ;
176+ use crate :: playlist:: SmallbankGeneratingIter ;
175177
176178 const NUM_CREATE_ACCOUNTS : usize = 100 ;
177179 const NUM_TO_CONSIDER : usize = 1_000 ;
You can’t perform that action at this time.
0 commit comments