You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# result.value = JSON.parse result.value# TODO: [BDNS] this! also, note that we're converting JSON multiple times# this is ineffecient and ugly.# organize all this code in a generic way to support all blockchains.
Let's do this in the icann branch I just created (on top of which #67 will be rebased and a new PR submitted).
@wemeetagain let's work together to do the following:
Create a template blockchain.coffee file that contains a class for the other blockchains to subclass (in nmc.coffee, bdns.coffee, etc.)
Move the subclasses into a blockchains folder that's inside of src or src/lib (not sure yet, which do you think is better?)
When DNSChain boots up, automagically load up all of the files from the blockchains folder. The subclasses themselves must check to see if the system supports them. If they are able to "boot up" then they automatically set themselves up to start processing queries. This can be automated a bit by having the super class have a method that must be overridden (called config:). Return null if no file can be found, otherwise return an object? with the configuration.
Address the inefficiency and ugly issues that the TODO: comment above describes.
Ultimately, adding a new blockchain will consist of simply copying the blockchain.coffee template into blockchains/ and overriding it, and that's it. No other files should need touching.
The text was updated successfully, but these errors were encountered:
See this comment:
Let's do this in the
icann
branch I just created (on top of which #67 will be rebased and a new PR submitted).@wemeetagain let's work together to do the following:
blockchain.coffee
file that contains a class for the other blockchains to subclass (innmc.coffee
,bdns.coffee
, etc.)blockchains
folder that's inside ofsrc
orsrc/lib
(not sure yet, which do you think is better?)blockchains
folder. The subclasses themselves must check to see if the system supports them. If they are able to "boot up" then they automatically set themselves up to start processing queries. This can be automated a bit by having the super class have a method that must be overridden (calledconfig:
). Returnnull
if no file can be found, otherwise return an object? with the configuration.dnschain.conf
and use it instead if so use it instead (Allow dnschain.conf to specify path to the namecoin configuration file #60).TODO:
comment above describes.Ultimately, adding a new blockchain will consist of simply copying the
blockchain.coffee
template intoblockchains/
and overriding it, and that's it. No other files should need touching.The text was updated successfully, but these errors were encountered: