Bitcoin Forum
May 13, 2024, 02:33:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Code Editing Questions  (Read 1928 times)
AlexMerced (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
April 25, 2013, 12:09:18 PM
 #1

I'm editing the SmallChange source code which is a liteocoin fork, I'm following the exact changes made to the litecoin source as shown here:

https://github.com/bfroemel/smallchange/commit/947a0fafd8d033f6f0960c4ff0748f76a3d58326



I ran into this piece of code and it raised a few questions...

  // Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
     const bool loopback = !mapArgs.count("-rpcallowip");
     asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any();
-    ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 9332));
+    ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 9031));
 
     boost::signals2::signal<void ()> StopRequests;
 
@@ -3165,7 +3165,7 @@ Object CallRPC(const string& strMethod, const Array& params)
     asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
     SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
     iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
-    if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "9332")))
+    if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "9031")))
         throw runtime_error("couldn't connect to server");


- Do I have to create a server?, I thought these currencies were decentralized
- If so do I need a static IP, or can I change "9031" to anything?




Second Question:

I want the currency address codes to start with the letter H, here is the code to change it but I can't find a table showing which numbers correspond with which letter:

-        PUBKEY_ADDRESS = 48, // Litecoin addresses start with L
+        PUBKEY_ADDRESS = 62, // addresses start with S

1715567621
Hero Member
*
Offline Offline

Posts: 1715567621

View Profile Personal Message (Offline)

Ignore
1715567621
Reply with quote  #2

1715567621
Report to moderator
1715567621
Hero Member
*
Offline Offline

Posts: 1715567621

View Profile Personal Message (Offline)

Ignore
1715567621
Reply with quote  #2

1715567621
Report to moderator
1715567621
Hero Member
*
Offline Offline

Posts: 1715567621

View Profile Personal Message (Offline)

Ignore
1715567621
Reply with quote  #2

1715567621
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
April 25, 2013, 04:27:31 PM
 #2

The server mentioned is the RPC server that lets you interact with the daemon.

9031 is just the default port.  You can change it, and probably should.  The rpcport option in the config file or on the command line will override your default port either way.

Either 40 or 41 will give an initial character of H.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
AlexMerced (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
April 25, 2013, 04:55:42 PM
 #3

super thanks, does it matter what I change the port number too, could i just add 1 to it.

kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
April 25, 2013, 05:10:04 PM
 #4

It doesn't matter a whole lot.  You will want to avoid ports that people might be using for other things.  Most things based on the bitcoin source use two sequential ports, so you may want to go up by at least 2, and change both.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
AlexMerced (OP)
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
April 25, 2013, 07:49:52 PM
 #5

sweet thanks, can the same code be used to compile for unix/pc/windows

I have a windows PC, but I think this smallchange code was originally compiled for unix, didn't know if there was something I need to different if I plan on compiling it for a windows client.

Like the code doesn't scare me more than compiling it later does.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!