@@ -884,52 +884,6 @@ class tx_wtr : public net_wtr
884884 }
885885};
886886
887- void rpc::upd_price::build_tx ( bincode& tx )
888- {
889- // signatures section
890- tx.add_len <1 >(); // one signature (publish)
891- size_t pub_idx = tx.reserve_sign ();
892-
893- // message header
894- size_t tx_idx = tx.get_pos ();
895- tx.add ( (uint8_t )1 ); // pub is only signing account
896- tx.add ( (uint8_t )0 ); // read-only signed accounts
897- tx.add ( (uint8_t )2 ); // sysvar and program-id are read-only
898- // unsigned accounts
899-
900- // accounts
901- tx.add_len <4 >(); // 4 accounts: publish, symbol, sysvar, program
902- tx.add ( *pkey_ ); // publish account
903- tx.add ( *akey_ ); // symbol account
904- tx.add ( *(pub_key*)sysvar_clock ); // sysvar account
905- tx.add ( *gkey_ ); // programid
906-
907- // recent block hash
908- tx.add ( *bhash_ ); // recent block hash
909-
910- // instructions section
911- tx.add_len <1 >(); // one instruction
912- tx.add ( (uint8_t )3 ); // program_id index
913- tx.add_len <3 >(); // 3 accounts: publish, symbol, sysvar
914- tx.add ( (uint8_t )0 ); // index of publish account
915- tx.add ( (uint8_t )1 ); // index of symbol account
916- tx.add ( (uint8_t )2 ); // index of sysvar account
917-
918- // instruction parameter section
919- tx.add_len <sizeof (cmd_upd_price)>();
920- tx.add ( (uint32_t )PC_VERSION );
921- tx.add ( (int32_t )cmd_ );
922- tx.add ( (int32_t )st_ );
923- tx.add ( (int32_t )0 );
924- tx.add ( price_ );
925- tx.add ( conf_ );
926- tx.add ( pub_slot_ );
927-
928- // all accounts need to sign transaction
929- tx.sign ( pub_idx, tx_idx, *ckey_ );
930- sig_.init_from_buf ( (const uint8_t *)(tx.get_buf () + pub_idx) );
931- }
932-
933887bool rpc::upd_price::build_tx (
934888 bincode& tx, upd_price* upds[], const unsigned n
935889)
0 commit comments