bitcore/const.js

19 lines
288 B
JavaScript
Raw Normal View History

2014-01-08 10:25:49 -08:00
MSG = {
TX: 1,
BLOCK: 2,
FILTERED_BLOCK: 3,
};
2014-01-08 10:25:49 -08:00
MSG.to_str = function(t) {
switch(t) {
case MSG.TX: return 'transaction';
case MSG.BLOCK: return 'block';
case MSG.FILTERED_BLOCK: return 'filtered block';
default: return 'unknown';
}
}
exports.MSG = MSG;