1010
1111//! A very simple example used as a self-test of this library against a Bitcoin
1212//! Core node.
13- extern crate bitcoincore_rpc ;
13+ extern crate dashcore_rpc ;
1414
15- use bitcoincore_rpc :: { bitcoin , Auth , Client , Error , RpcApi } ;
15+ use dashcore_rpc :: { dashcore , Auth , Client , Error , RpcApi } ;
1616
1717fn main_result ( ) -> Result < ( ) , Error > {
1818 let mut args = std:: env:: args ( ) ;
@@ -35,10 +35,10 @@ fn main_result() -> Result<(), Error> {
3535 println ! ( "best block hash by height: {}" , best_block_hash_by_height) ;
3636 assert_eq ! ( best_block_hash_by_height, best_block_hash) ;
3737
38- let bitcoin_block : bitcoin :: Block = rpc. get_by_id ( & best_block_hash) ?;
39- println ! ( "best block hash by `get`: {}" , bitcoin_block . header. prev_blockhash) ;
40- let bitcoin_tx : bitcoin :: Transaction = rpc. get_by_id ( & bitcoin_block . txdata [ 0 ] . txid ( ) ) ?;
41- println ! ( "tx by `get`: {}" , bitcoin_tx . txid( ) ) ;
38+ let dashcore_block : dashcore :: Block = rpc. get_by_id ( & best_block_hash) ?;
39+ println ! ( "best block hash by `get`: {}" , dashcore_block . header. prev_blockhash) ;
40+ let dashcore_tx : dashcore :: Transaction = rpc. get_by_id ( & dashcore_block . txdata [ 0 ] . txid ( ) ) ?;
41+ println ! ( "tx by `get`: {}" , dashcore_tx . txid( ) ) ;
4242
4343 Ok ( ( ) )
4444}
0 commit comments